Function at 0x40ec20
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x46ea39
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
mov eax, dword [0x48b998]
xor eax, esp
mov dword [esp + 0x2d8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48b998]
xor eax, esp
push eax
lea eax, [esp + 0x2f0]
mov dword fs:[0], eax
mov eax, dword [esp + 0x300]
mov ebp, dword [esp + 0x308]
mov dword [esp + 0x24], eax
push eax
xor ebx, ebx
lea eax, [esp + 0x170]
lea esi, [esp + 0xe8]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x1c], ebx
call fcn.00415530
mov edi, eax
add esp, 4
cmp edi, ebx
je 0x40ed08
call fcn.0040fe50
cmp dword [eax + 4], ebx
jg 0x40ecf5
push edi
lea esi, [esp + 0x40]
call fcn.0040e000
sub esp, 0x18
mov dword [esp + 0x314], ebx
mov esi, esp
mov dword [esp + 0x44], esp
push eax
mov edx, str.unzGetCurrentFileInfo
call fcn.0040d250
mov byte [esp + 0x318], 1
call fcn.0040fe50
add esp, 4
mov esi, eax
mov byte [esp + 0x314], bl
call fcn.0040fbf0
cmp dword [esp + 0x54], 8
jb 0x40ecf5
mov edx, dword [esp + 0x40]
push edx
call fcn.0042bced
add esp, 4
push edi
push str.error__d_with_zipfile_in_unzGetCurrentFileInfo_n
call fcn.00452544
add esp, 8
jmp 0x40f788
push 0x2000
call fcn.0044f3bc
add esp, 4
mov dword [esp + 0x30], eax
cmp eax, ebx
jne 0x40ed77
call fcn.0040fe50
cmp dword [eax + 4], ebx
jg 0x40ed60
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x44], esp
push str.malloc
call fcn.00402cd0
push ecx
mov dword [esp + 0x318], 2
call fcn.0040fe50
add esp, 4
mov esi, eax
mov dword [esp + 0x314], 0xffffffff
call fcn.0040fbf0
push str.Error_allocating_memory_n
call fcn.00452544
add esp, 4
mov eax, 0xffffff98
jmp 0x40f78a
mov al, byte [esp + 0x16c]
lea ecx, [esp + 0x16c]
test al, al
je 0x40eda4
lea esp, [esp]
cmp byte [ecx], 0x2f
jne 0x40ed98
mov byte [ecx], 0x5c
inc ecx
cmp byte [ecx], bl
jne 0x40ed90
mov al, byte [esp + 0x16c]
lea edx, [esp + 0x16c]
mov ecx, edx
test al, al
je 0x40f77b
cmp al, 0x2f
je 0x40edbd
cmp al, 0x5c
jne 0x40edc0
lea edx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x40edb5
mov dword [esp + 0x34], edx
cmp byte [edx], bl
je 0x40f77b
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x168], 7
mov dword [esp + 0x164], eax
mov word [esp + 0x154], cx
mov ecx, dword [esp + 0x304]
mov esi, 3
mov dword [esp + 0x2f8], esi
cmp dword [ecx], eax
mov dword [esp + 0x28], eax
mov eax, edx
jne 0x40ee16
lea eax, [esp + 0x16c]
sub esp, 0x1c
cmp byte [esp + 0x328], 0
mov ecx, esp
je 0x40ee4d
mov dword [esp + 0x34], esp
push eax
call fcn.00402720
lea ecx, [esp + 0xac]
call fcn.00402210
add esp, 0x1c
mov byte [esp + 0x2f8], 4
mov ebx, 1
jmp 0x40ee73
mov dword [esp + 0x38], esp
push eax
call fcn.00402720
lea ecx, [esp + 0x58]
call fcn.00402290
add esp, 0x1c
mov dword [esp + 0x2f8], 5
mov ebx, 2
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x15c]
mov dword [esp + 0x24], ebx
call fcn.004039d0
test bl, 2
je 0x40ee99
lea ecx, [esp + 0x3c]
and ebx, 0xfffffffd
call fcn.00402d40
mov dword [esp + 0x2f8], esi
test bl, 1
je 0x40eeb1
lea ecx, [esp + 0x90]
call fcn.00402d40
push ebp
lea ecx, [esp + 0x138]
call fcn.00402cd0
mov byte [esp + 0x2f8], 6
cmp dword [esp + 0x148], 0
je 0x40ef27
lea edx, [esp + 0x1c]
push edx
lea edi, [esp + 0x138]
call fcn.00409360
call fcn.00409f30
cmp word [eax], 0x5c
jne 0x40ef27
mov eax, dword [esp + 0x154]
mov ebp, 8
cmp dword [esp + 0x168], ebp
jae 0x40ef08
lea eax, [esp + 0x154]
cmp word [eax], 0x5c
jne 0x40ef2c
mov eax, dword [esp + 0x148]
push 0xffffffffffffffff
dec eax
push eax
lea ecx, [esp + 0x13c]
call fcn.00404940
jmp 0x40ef2c
mov ebp, 8
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x158]
push ecx
lea ecx, [esp + 0x140]
call fcn.0040b4d0
sub esp, 0x1c
mov dword [esp + 0x38], esp
mov esi, esp
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x54], esp
xor edx, edx
push 0xffffffffffffffff
push edx
lea eax, [esp + 0x174]
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], 0
push eax
mov word [ecx + 4], dx
call fcn.004039d0
push esi
call fcn.00408470
add esp, 0x20
call fcn.00408c80
mov ecx, dword [esp + 0x40]
add esp, 0x1c
push ecx
call fcn.00415c80
mov edi, eax
add esp, 4
test edi, edi
je 0x40f013
call fcn.0040fe50
cmp dword [eax + 4], 0
jg 0x40f005
push edi
lea esi, [esp + 0x94]
call fcn.0040e000
sub esp, 0x18
mov byte [esp + 0x314], 7
mov esi, esp
mov dword [esp + 0x38], esp
push eax
mov edx, str.unzOpenCurrentFile
call fcn.0040d250
mov byte [esp + 0x318], 8
call fcn.0040fe50
add esp, 4
mov esi, eax
mov byte [esp + 0x314], 7
call fcn.0040fbf0
lea ecx, [esp + 0x90]
mov byte [esp + 0x2f8], 6
call fcn.00402d40
push edi
push str.error__d_with_zipfile_in_unzOpenCurrentFile_n
call fcn.00452544
add esp, 8
mov ebx, dword [esp + 0x38]
cmp dword [ebx], 0
jne 0x40f0d8
test edi, edi
jne 0x40f71b
mov eax, dword [esp + 0x138]
cmp dword [esp + 0x14c], ebp
jae 0x40f03f
lea eax, [esp + 0x138]
push 0x47c40c
push eax
call fcn.00451a67
add esp, 8
test eax, eax
je 0x40f0b1
push eax
call fcn.0044eb0c
add esp, 4
lea ebx, [ebx]
sub esp, 0x1c
mov edi, esp
mov ecx, 7
lea esi, [esp + 0x150]
push str.The_file__s_exist._Overwrite____y_es___n_o___A_ll:
rep movsd dword es:[edi], dword [esi]
call fcn.00452544
lea edx, [esp + 0x28c]
push edx
push 0x47c914
call fcn.00452527
mov al, byte [esp + 0x294]
add esp, 0x28
cmp al, 0x61
jl 0x40f0a3
cmp al, 0x7a
jg 0x40f0a3
sub al, 0x20
cmp al, 0x59
je 0x40f0b5
cmp al, 0x4e
je 0x40f0b9
cmp al, 0x41
jne 0x40f060
jmp 0x40f0b5
mov al, byte [esp + 0x2f]
cmp al, 0x4e
jne 0x40f0c0
mov ecx, 1
jmp 0x40f0c4
mov ecx, dword [esp + 0x28]
cmp al, 0x41
jne 0x40f0ce
mov dword [ebx], 1
test ecx, ecx
jne 0x40f605
jmp 0x40f0e0
test edi, edi
jne 0x40f71b
mov eax, dword [esp + 0x138]
cmp dword [esp + 0x14c], ebp
jae 0x40f0f7
lea eax, [esp + 0x138]
push 0x47c918
push eax
call fcn.00451a67
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
add esp, 8
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x40f477
call fcn.0040fe50
mov eax, dword [eax + 4]
test eax, eax
jg 0x40f246
push 0x250
lea esi, [esp + 0x5c]
call fcn.0040e000
add esp, 4
mov edi, eax
mov byte [esp + 0x2f8], 9
call ebp
push eax
lea esi, [esp + 0xb0]
call fcn.0040e000
add esp, 4
push eax
mov edx, str._wfopen
lea esi, [esp + 0xcc]
mov byte [esp + 0x2fc], 0xa
call fcn.0040d250
add esp, 4
push str._line
push eax
lea eax, [esp + 0x7c]
push eax
mov byte [esp + 0x304], 0xb
call fcn.0040b830
add esp, 0xc
push edi
mov ecx, eax
lea esi, [esp + 0x40]
mov byte [esp + 0x2fc], 0xc
call fcn.0040b900
add esp, 4
push 0x47c920
push eax
lea ecx, [esp + 0x98]
push ecx
mov byte [esp + 0x304], 0xd
call fcn.0040b830
sub esp, 0x10
mov bl, 0xe
mov byte [esp + 0x314], bl
lea edx, [esp + 0x150]
mov esi, esp
mov dword [esp + 0x38], esp
push edx
mov ecx, eax
call fcn.0040b900
mov byte [esp + 0x318], 0xf
call fcn.0040fe50
add esp, 4
mov esi, eax
mov byte [esp + 0x314], bl
call fcn.0040fbf0
lea ecx, [esp + 0x90]
call fcn.00402d40
lea ecx, [esp + 0x3c]
call fcn.00402d40
lea ecx, [esp + 0x74]
call fcn.00402d40
lea ecx, [esp + 0xc8]
call fcn.00402d40
lea ecx, [esp + 0xac]
call fcn.00402d40
lea ecx, [esp + 0x58]
mov byte [esp + 0x2f8], 6
call fcn.00402d40
call fcn.0044ea4c
mov eax, dword [eax]
push eax
sub esp, 0x1c
mov edi, esp
mov ecx, 7
lea esi, [esp + 0x154]
push str.open_file__s_fail_:__d_n
rep movsd dword es:[edi], dword [esi]
call fcn.00452544
mov ecx, dword [esp + 0x328]
add esp, 0x24
cmp dword [ecx], 0
jne 0x40f452
mov esi, dword [esp + 0x34]
lea edx, [esp + 0x16c]
cmp esi, edx
je 0x40f452
mov bl, byte [esi - 1]
sub esp, 0x1c
mov dword [esp + 0x38], esp
mov edi, esp
sub esp, 0x1c
lea eax, [esp + 0x16c]
mov ecx, esp
mov dword [esp + 0x54], esp
push eax
mov byte [esi - 1], 0
call fcn.00402d10
push edi
call fcn.00408470
add esp, 0x20
call fcn.00408c80
mov eax, dword [esp + 0x154]
add esp, 0x1c
cmp dword [esp + 0x14c], 8
mov byte [esi - 1], bl
jae 0x40f2e3
lea eax, [esp + 0x138]
push 0x47c978
push eax
call fcn.00451a67
mov ebx, eax
add esp, 8
mov dword [esp + 0x18], eax
test ebx, ebx
jne 0x40f477
call fcn.0040fe50
cmp dword [eax + 4], ebx
jg 0x40f42a
push 0x269
lea esi, [esp + 0x40]
call fcn.0040e000
add esp, 4
mov edi, eax
mov byte [esp + 0x2f8], 0x10
call ebp
push eax
lea esi, [esp + 0x94]
call fcn.0040e000
add esp, 4
push eax
mov edx, str._wfopen
lea esi, [esp + 0x78]
mov byte [esp + 0x2fc], 0x11
call fcn.0040d250
add esp, 4
push str._line
push eax
lea ecx, [esp + 0xd0]
push ecx
mov byte [esp + 0x304], 0x12
call fcn.0040b830
add esp, 0xc
push edi
mov ecx, eax
lea esi, [esp + 0xb0]
mov byte [esp + 0x2fc], 0x13
call fcn.0040b900
add esp, 4
push 0x47c920
push eax
lea edx, [esp + 0x60]
push edx
mov byte [esp + 0x304], 0x14
call fcn.0040b830
sub esp, 0x10
mov bl, 0x15
mov byte [esp + 0x314], bl
lea ecx, [esp + 0x150]
mov esi, esp
mov dword [esp + 0x38], esp
push ecx
mov ecx, eax
call fcn.0040b900
mov byte [esp + 0x318], 0x16
call fcn.0040fe50
add esp, 4
mov esi, eax
mov byte [esp + 0x314], bl
call fcn.0040fbf0
lea ecx, [esp + 0x58]
call fcn.00402d40
lea ecx, [esp + 0xac]
call fcn.00402d40
lea ecx, [esp + 0xc8]
call fcn.00402d40
lea ecx, [esp + 0x74]
call fcn.00402d40
lea ecx, [esp + 0x90]
call fcn.00402d40
lea ecx, [esp + 0x3c]
mov byte [esp + 0x2f8], 6
call fcn.00402d40
call fcn.0044ea4c
mov edx, dword [eax]
push edx
sub esp, 0x1c
mov edi, esp
mov ecx, 7
lea esi, [esp + 0x154]
push str.create_file__s_fail_:__d_n
rep movsd dword es:[edi], dword [esi]
call fcn.00452544
add esp, 0x24
sub esp, 0x1c
mov edi, esp
mov ecx, 7
lea esi, [esp + 0x150]
push str.error_opening__s_n
rep movsd dword es:[edi], dword [esi]
call fcn.00452544
add esp, 0x20
jmp 0x40f605
mov esi, dword [esp + 0x30]
jmp 0x40f480
mov eax, dword [esp + 0x24]
push esi
call fcn.00415e50
mov edi, eax
add esp, 4
test edi, edi
jl 0x40f62b
jle 0x40f58d
push ebx
push 1
push edi
push esi
call fcn.0044f2c1
add esp, 0x10
cmp eax, 1
je 0x40f480
call fcn.0040fe50
cmp dword [eax + 4], 0
jg 0x40f58a
push 0x286
lea esi, [esp + 0x78]
call fcn.0040e000
add esp, 4
mov edi, eax
mov byte [esp + 0x2f8], 0x1c
call ebp
push eax
lea esi, [esp + 0xcc]
call fcn.0040e000
add esp, 4
push eax
mov edx, str.fwrite
lea esi, [esp + 0xb0]
mov byte [esp + 0x2fc], 0x1d
call fcn.0040d250
add esp, 4
push str._line
push eax
lea ecx, [esp + 0x60]
push ecx
mov byte [esp + 0x304], 0x1e
call fcn.0040b830
sub esp, 0x10
mov byte [esp + 0x314], 0x1f
mov esi, esp
mov dword [esp + 0x38], esp
push edi
mov ecx, eax
call fcn.0040b900
mov byte [esp + 0x318], 0x20
call fcn.0040fe50
add esp, 4
mov esi, eax
mov byte [esp + 0x314], 0x1f
call fcn.0040fbf0
lea ecx, [esp + 0x58]
call fcn.00402d40
lea ecx, [esp + 0xac]
call fcn.00402d40
lea ecx, [esp + 0xc8]
call fcn.00402d40
lea ecx, [esp + 0x74]
mov byte [esp + 0x2f8], 6
call fcn.00402d40
or edi, 0xffffffff
push ebx
call fcn.0044eb0c
add esp, 4
test edi, edi
jne 0x40f71b
cmp dword [esp + 0x14c], 8
mov eax, dword [esp + 0x138]
jae 0x40f5b6
lea eax, [esp + 0x138]
mov edx, dword [esp + 0x11c]
sub esp, 0x18
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x138]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x13c]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x140]
mov dword [ecx + 0xc], edx
mov edx, dword [esp + 0x144]
mov dword [ecx + 0x10], edx
mov edx, dword [esp + 0x148]
mov dword [ecx + 0x14], edx
mov ecx, dword [esp + 0x10c]
call fcn.0040f7c0
add esp, 0x18
mov ebx, dword [esp + 0x24]
call fcn.004160f0
mov edi, eax
test edi, edi
je 0x40f724
push edi
push str.error__d_with_zipfile_in_unzCloseCurrentFile_n
call fcn.00452544
add esp, 8
jmp 0x40f724
call fcn.0040fe50
cmp dword [eax + 4], 0
jg 0x40f708
push 0x27e
lea esi, [esp + 0x78]
call fcn.0040e000
add esp, 4
mov ebx, eax
push edi
lea esi, [esp + 0xcc]
mov byte [esp + 0x2fc], 0x17
call fcn.0040e000
add esp, 4
push eax
mov edx, str.unzReadCurrentFile
lea esi, [esp + 0xb0]
mov byte [esp + 0x2fc], 0x18
call fcn.0040d250
add esp, 4
push str._line
push eax
lea eax, [esp + 0x60]
push eax
mov byte [esp + 0x304], 0x19
call fcn.0040b830
sub esp, 0x10
mov byte [esp + 0x314], 0x1a
mov esi, esp
mov dword [esp + 0x38], esp
push ebx
mov ecx, eax
call fcn.0040b900
mov byte [esp + 0x318], 0x1b
call fcn.0040fe50
add esp, 4
mov esi, eax
mov byte [esp + 0x314], 0x1a
call fcn.0040fbf0
lea ecx, [esp + 0x58]
call fcn.00402d40
lea ecx, [esp + 0xac]
call fcn.00402d40
lea ecx, [esp + 0xc8]
call fcn.00402d40
lea ecx, [esp + 0x74]
mov byte [esp + 0x2f8], 6
call fcn.00402d40
mov ebx, dword [esp + 0x18]
push edi
push str.error__d_with_zipfile_in_unzReadCurrentFile_n
call fcn.00452544
add esp, 8
jmp 0x40f58d
mov ebx, dword [esp + 0x24]
call fcn.004160f0
mov esi, 8
cmp dword [esp + 0x14c], esi
jb 0x40f742
mov eax, dword [esp + 0x138]
push eax
call fcn.0042bced
add esp, 4
xor ecx, ecx
mov dword [esp + 0x14c], 7
mov dword [esp + 0x148], 0
mov word [esp + 0x138], cx
cmp dword [esp + 0x168], esi
jb 0x40f77b
mov edx, dword [esp + 0x154]
push edx
call fcn.0042bced
add esp, 4
mov eax, dword [esp + 0x30]
push eax
call fcn.0044cf4b
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x2f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2d8]
xor ecx, esp
call fcn.0044b1f7
add esp, 0x2e8
ret