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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4590c0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x465040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x465538]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], 6
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x40908b
cmp byte [ebx + 1], 0
je 0x40908b
mov byte [eax + 0x10], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x40908b
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00430460
mov ecx, esi
call fcn.00430670
add esi, 0x3c
xor edx, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edx
cmp dword [esi], edx
jle 0x409004
xor ecx, ecx
mov ebx, esi
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebx + 8]
mov esi, dword [ecx + eax]
test esi, esi
je 0x408fec
mov ecx, esi
call fcn.00432f40
mov ecx, dword [0x465538]
test ecx, ecx
je 0x408fe0
movsx eax, word [ecx + 0x5200]
mov edx, dword [ecx + 0x3f70]
mov dword [ebp - 0x24], edx
lea eax, [eax*8 + 0x5204]
add eax, ecx
cmp dword [eax], edx
je 0x408fd6
movsx eax, word [ecx + 0x5200]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x24]
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push esi
call edi
mov ecx, dword [ebp - 0x1c]
add esp, 4
mov edx, dword [ebp - 0x18]
inc edx
add ecx, 4
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], ecx
cmp edx, dword [ebx]
jl 0x408f74
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
mov ecx, esi
call fcn.004026a0
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x54]
mov byte [eax + 0x18], 0
call fcn.00420390
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx + 0x48]
call fcn.00420390
mov ecx, esi
call fcn.00420390
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x465538]
test ecx, ecx
je 0x409083
movsx edx, word [ecx + 0x5200]
lea eax, [ecx + 0x5204]
mov esi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x409079
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
xor edx, edx
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push dword [ebp - 0x14]
call edi
add esp, 4
lea ecx, [ebx + 0x3d90]
mov dword [ebx + 0x2c], 0
call fcn.004026a0
cmp byte [ebx], 0
je 0x4098b6
cmp byte [ebx + 0x50d0], 0
je 0x409102
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x409102
mov eax, dword [0x465538]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [eax + 0x50d4], 0
call fcn.0041e8d0
mov edx, 0x4600c0
mov dword [ebp - 0x28], eax
mov ecx, esi
call fcn.00405a40
mov esi, eax
test esi, esi
je 0x409102
push esi
push dword [ebp - 0x20]
push 1
push dword [ebp - 0x28]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov eax, dword [ebx + 0x5108]
mov esi, dword [ebx + 0x5110]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov dword [ebp - 0x28], eax
cmp esi, eax
je 0x40913a
nop dword [eax + eax]
cmp dword [esi + 4], 6
jne 0x409133
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
mov eax, dword [ebp - 0x28]
add esp, 8
add esi, 0x14
cmp esi, eax
jne 0x409120
xor ecx, ecx
lea edx, [ebx + 0x3fb8]
mov dword [ebp - 0x20], ecx
cmp dword [edx], ecx
jle 0x4091e4
xor edi, edi
nop
mov eax, dword [edx + 8]
mov esi, dword [edi + eax]
test esi, esi
je 0x4091cf
mov ecx, esi
call fcn.0040a0d0
mov ecx, dword [0x465538]
test ecx, ecx
je 0x4091bc
movsx eax, word [ecx + 0x5200]
mov edx, dword [ecx + 0x3f70]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x5204]
add eax, ecx
cmp dword [eax], edx
je 0x4091b2
movsx eax, word [ecx + 0x5200]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp - 0x20]
lea edx, [ebx + 0x3fb8]
add esp, 4
inc ecx
add edi, 4
mov dword [ebp - 0x20], ecx
cmp ecx, dword [edx]
jl 0x409150
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, edx
call fcn.004026a0
lea ecx, [ebx + 0x3fc4]
call fcn.004026a0
lea ecx, [ebx + 0x3fd0]
call fcn.004026a0
mov dword [ebx + 0x4004], 0
mov esi, dword [ebx + 0x3fe4]
test esi, esi
je 0x409294
mov ecx, dword [0x465538]
mov dword [ebx + 0x3fe0], 0
mov dword [ebx + 0x3fdc], 0
test ecx, ecx
je 0x409284
movsx eax, word [ecx + 0x5200]
mov edx, dword [ecx + 0x3f70]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x5204]
add eax, ecx
cmp dword [eax], edx
je 0x40927a
movsx eax, word [ecx + 0x5200]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push esi
call edi
add esp, 4
mov dword [ebx + 0x3fe4], 0
lea ecx, [ebx + 0x3fe8]
call fcn.004026a0
or eax, 0xffffffff
mov dword [ebx + 0x4ad8], 0
mov dword [ebx + 0x400c], 0
lea edi, [ebx + 0x4804]
mov dword [ebx + 0x4008], 0
mov ecx, 0x4d
mov dword [ebx + 0x4090], 0
mov dword [ebx + 0x4080], 0
mov dword [ebx + 0x4014], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x4938]
call fcn.004026a0
lea ecx, [ebx + 0x4944]
call fcn.004026a0
mov esi, dword [ebx + 0x4a68]
test esi, esi
je 0x409387
mov ecx, dword [0x465538]
mov dword [ebx + 0x4a64], 0
mov dword [ebx + 0x4a60], 0
test ecx, ecx
je 0x40936f
movsx edx, word [ecx + 0x5200]
lea eax, [ecx + 0x5204]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x409365
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
mov dword [ebx + 0x4a68], 0
jmp 0x40938d
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [ebx + 0x4a74]
test edi, edi
je 0x409416
mov ecx, dword [0x465538]
mov dword [ebx + 0x4a70], 0
mov dword [ebx + 0x4a6c], 0
test ecx, ecx
je 0x409406
movsx eax, word [ecx + 0x5200]
mov edx, dword [ecx + 0x3f70]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x5204]
add eax, ecx
cmp dword [eax], edx
je 0x4093fc
movsx eax, word [ecx + 0x5200]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4a74], 0
lea ecx, [ebx + 0x4a78]
call fcn.004026a0
lea ecx, [ebx + 0x4aa8]
call fcn.004026a0
lea ecx, [ebx + 0x4ab4]
call fcn.004026a0
mov edi, dword [ebx + 0x4ac8]
test edi, edi
je 0x4094c0
mov ecx, dword [0x465538]
mov dword [ebx + 0x4ac4], 0
mov dword [ebx + 0x4ac0], 0
test ecx, ecx
je 0x4094b0
movsx eax, word [ecx + 0x5200]
mov edx, dword [ecx + 0x3f70]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x5204]
add eax, ecx
cmp dword [eax], edx
je 0x4094a6
movsx eax, word [ecx + 0x5200]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4ac8], 0
lea ecx, [ebx + 0x4acc]
call fcn.00420ab0
lea ecx, [ebx + 0x4dd8]
call fcn.004205f0
mov edi, dword [ebx + 0x4e00]
test edi, edi
je 0x40955f
mov ecx, dword [0x465538]
mov dword [ebx + 0x4dfc], 0
mov dword [ebx + 0x4df8], 0
test ecx, ecx
je 0x40954f
movsx eax, word [ecx + 0x5200]
mov edx, dword [ecx + 0x3f70]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x5204]
add eax, ecx
cmp dword [eax], edx
je 0x409545
movsx eax, word [ecx + 0x5200]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4e00], 0
mov edi, dword [ebx + 0x4e0c]
test edi, edi
je 0x4095e8
mov ecx, dword [0x465538]
mov dword [ebx + 0x4e08], 0
mov dword [ebx + 0x4e04], 0
test ecx, ecx
je 0x4095d8
movsx eax, word [ecx + 0x5200]
mov edx, dword [ecx + 0x3f70]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x5204]
add eax, ecx
cmp dword [eax], edx
je 0x4095ce
movsx eax, word [ecx + 0x5200]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4e0c], 0
xor edi, edi
lea eax, [ebx + 0x4d80]
mov dword [ebp - 0x20], eax
cmp dword [ebx + 0x4d78], edi
jle 0x409626
xor esi, esi
nop dword [eax]
mov ecx, dword [eax]
add ecx, 0x10
add ecx, esi
call fcn.00420390
inc edi
lea eax, [ebx + 0x4d80]
add esi, 0x1c
cmp edi, dword [ebx + 0x4d78]
jl 0x409600
lea eax, [ebx + 0x4d80]
jmp 0x409629
mov dword [ebp - 0x20], eax
mov esi, dword [eax]
test esi, esi
je 0x4096a6
mov ecx, dword [0x465538]
mov dword [ebx + 0x4d7c], 0
mov dword [ebx + 0x4d78], 0
test ecx, ecx
je 0x409693
movsx edx, word [ecx + 0x5200]
lea eax, [ecx + 0x5204]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x409689
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x20]
add esp, 4
mov dword [eax], 0
lea ecx, [ebx + 0x4d9c]
call fcn.00420730
xor edi, edi
cmp dword [ebx + 0x4d90], edi
jle 0x4096d9
xor esi, esi
nop dword [eax]
mov ecx, dword [ebx + 0x4d98]
add ecx, esi
call fcn.00421510
inc edi
add esi, 0x78
cmp edi, dword [ebx + 0x4d90]
jl 0x4096c0
mov esi, dword [ebx + 0x4d98]
test esi, esi
je 0x40975f
mov ecx, dword [0x465538]
mov dword [ebx + 0x4d94], 0
mov dword [ebx + 0x4d90], 0
test ecx, ecx
je 0x409747
movsx edx, word [ecx + 0x5200]
lea eax, [ecx + 0x5204]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40973d
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
mov dword [ebx + 0x4d98], 0
jmp 0x409765
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4dc8]
call fcn.004026a0
lea ecx, [ebx + 0x4e84]
call fcn.00420440
lea ecx, [ebx + 0x4e78]
call fcn.00420540
lea ecx, [ebx + 0x5038]
call fcn.004026a0
lea ecx, [ebx + 0x5044]
call fcn.004026a0
lea ecx, [ebx + 0x4edc]
call fcn.004026a0
lea ecx, [ebx + 0x4ee8]
call fcn.004026a0
lea ecx, [ebx + 0x4f28]
mov dword [ebx + 0x4f24], 0
call fcn.004026a0
lea ecx, [ebx + 0x50f0]
call fcn.004026a0
mov eax, dword [ebx + 0x50ec]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x409856
mov ecx, dword [0x465538]
mov dword [ebx + 0x50e8], 0
mov dword [ebx + 0x50e4], 0
test ecx, ecx
je 0x409846
movsx edx, word [ecx + 0x5200]
lea eax, [ecx + 0x5204]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x409839
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5200], ax
cwde
lea eax, [eax*8 + 0x5204]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x51fc]
mov eax, dword [ebp - 0x28]
push eax
call esi
add esp, 4
mov dword [ebx + 0x50ec], 0
cmp dword [ebx + 0x5148], 0
je 0x409888
mov esi, dword [ebx + 0x5148]
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
cmp esi, eax
je 0x40987e
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5148], 0
lea ecx, [ebx + 0x514c]
call fcn.004026a0
lea ecx, [ebx + 0x5178]
call fcn.004026a0
lea ecx, [ebx + 0x5184]
call fcn.004026a0
mov dword [ebx + 0x5190], 0
mov byte [ebx], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret