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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431f40
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x43b040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x43b430]
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 0x405669
cmp byte [ebx + 1], 0
je 0x405669
mov byte [eax + 0x10], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x405669
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00425b80
mov ecx, esi
call fcn.00425d80
add esi, 0x3c
xor edx, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edx
cmp dword [esi], edx
jle 0x4055e3
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 0x4055cb
mov ecx, esi
call fcn.00428400
mov ecx, dword [0x43b430]
test ecx, ecx
je 0x4055bf
movsx eax, word [ecx + 0x5f04]
mov edx, dword [ecx + 0x3f10]
add eax, 0xbe1
mov dword [ebp - 0x24], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x4055b5
movsx eax, word [ecx + 0x5f04]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x24]
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
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 0x405554
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
mov ecx, esi
call fcn.00401010
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x54]
mov byte [eax + 0x18], 0
call fcn.00419540
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx + 0x48]
call fcn.00419540
mov ecx, esi
call fcn.00419540
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x43b430]
test ecx, ecx
je 0x405661
movsx edx, word [ecx + 0x5f04]
lea eax, [ecx + 0x5f08]
mov esi, dword [ecx + 0x3f10]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x405657
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
push dword [ebp - 0x14]
call edi
add esp, 4
lea ecx, [ebx + 0x3d34]
mov dword [ebx + 0x2c], 0
call fcn.00401010
cmp byte [ebx], 0
je 0x405e79
cmp byte [ebx + 0x5ddc], 0
je 0x4056e0
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x4056e0
mov eax, dword [0x43b430]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [eax + 0x5de0], 0
call fcn.00418460
mov edx, 0x4340ac
mov dword [ebp - 0x28], eax
mov ecx, esi
call fcn.00403ed0
mov esi, eax
test esi, esi
je 0x4056e0
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 + 0x5e14]
mov esi, dword [ebx + 0x5e1c]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov dword [ebp - 0x28], eax
cmp esi, eax
je 0x40571a
nop dword [eax]
cmp dword [esi + 4], 6
jne 0x405713
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 0x405700
xor ecx, ecx
lea edx, [ebx + 0x3f48]
mov dword [ebp - 0x20], ecx
cmp dword [edx], ecx
jle 0x4057c3
xor edi, edi
nop
mov eax, dword [edx + 8]
mov esi, dword [edi + eax]
test esi, esi
je 0x4057ae
mov ecx, esi
call fcn.00406690
mov ecx, dword [0x43b430]
test ecx, ecx
je 0x40579b
movsx eax, word [ecx + 0x5f04]
mov edx, dword [ecx + 0x3f10]
add eax, 0xbe1
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x405791
movsx eax, word [ecx + 0x5f04]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [ebp - 0x20]
lea edx, [ebx + 0x3f48]
add esp, 4
inc ecx
add edi, 4
mov dword [ebp - 0x20], ecx
cmp ecx, dword [edx]
jl 0x405730
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, edx
call fcn.00401010
lea ecx, [ebx + 0x3f54]
call fcn.00401010
lea ecx, [ebx + 0x3f60]
call fcn.00401010
mov dword [ebx + 0x3f94], 0
mov esi, dword [ebx + 0x3f74]
test esi, esi
je 0x405872
mov ecx, dword [0x43b430]
mov dword [ebx + 0x3f70], 0
mov dword [ebx + 0x3f6c], 0
test ecx, ecx
je 0x405862
movsx eax, word [ecx + 0x5f04]
mov edx, dword [ecx + 0x3f10]
add eax, 0xbe1
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x405858
movsx eax, word [ecx + 0x5f04]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
push esi
call edi
add esp, 4
mov dword [ebx + 0x3f74], 0
lea ecx, [ebx + 0x3f78]
call fcn.00401010
or eax, 0xffffffff
mov dword [ebx + 0x4a50], 0
mov dword [ebx + 0x3f9c], 0
lea edi, [ebx + 0x4784]
mov dword [ebx + 0x3f98], 0
mov ecx, 0x4d
mov dword [ebx + 0x4014], 0
mov dword [ebx + 0x4004], 0
mov dword [ebx + 0x3fa0], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x48b8]
call fcn.00401010
lea ecx, [ebx + 0x48c4]
call fcn.00401010
mov esi, dword [ebx + 0x49e0]
test esi, esi
je 0x405964
mov ecx, dword [0x43b430]
mov dword [ebx + 0x49dc], 0
mov dword [ebx + 0x49d8], 0
test ecx, ecx
je 0x40594c
movsx edx, word [ecx + 0x5f04]
lea eax, [ecx + 0x5f08]
mov edi, dword [ecx + 0x3f10]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x405942
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
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 + 0x49e0], 0
jmp 0x40596a
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [ebx + 0x49ec]
test edi, edi
je 0x4059f2
mov ecx, dword [0x43b430]
mov dword [ebx + 0x49e8], 0
mov dword [ebx + 0x49e4], 0
test ecx, ecx
je 0x4059e2
movsx eax, word [ecx + 0x5f04]
mov edx, dword [ecx + 0x3f10]
add eax, 0xbe1
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x4059d8
movsx eax, word [ecx + 0x5f04]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
push edi
call esi
add esp, 4
mov dword [ebx + 0x49ec], 0
lea ecx, [ebx + 0x49f0]
call fcn.00401010
lea ecx, [ebx + 0x4a20]
call fcn.00401010
lea ecx, [ebx + 0x4a2c]
call fcn.00401010
mov edi, dword [ebx + 0x4a40]
test edi, edi
je 0x405a9b
mov ecx, dword [0x43b430]
mov dword [ebx + 0x4a3c], 0
mov dword [ebx + 0x4a38], 0
test ecx, ecx
je 0x405a8b
movsx eax, word [ecx + 0x5f04]
mov edx, dword [ecx + 0x3f10]
add eax, 0xbe1
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x405a81
movsx eax, word [ecx + 0x5f04]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4a40], 0
lea ecx, [ebx + 0x4a44]
call fcn.00419840
lea ecx, [ebx + 0x4d4c]
call fcn.004195e0
mov edi, dword [ebx + 0x4d74]
test edi, edi
je 0x405b39
mov ecx, dword [0x43b430]
mov dword [ebx + 0x4d70], 0
mov dword [ebx + 0x4d6c], 0
test ecx, ecx
je 0x405b29
movsx eax, word [ecx + 0x5f04]
mov edx, dword [ecx + 0x3f10]
add eax, 0xbe1
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x405b1f
movsx eax, word [ecx + 0x5f04]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4d74], 0
mov edi, dword [ebx + 0x4d80]
test edi, edi
je 0x405bc1
mov ecx, dword [0x43b430]
mov dword [ebx + 0x4d7c], 0
mov dword [ebx + 0x4d78], 0
test ecx, ecx
je 0x405bb1
movsx eax, word [ecx + 0x5f04]
mov edx, dword [ecx + 0x3f10]
add eax, 0xbe1
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x405ba7
movsx eax, word [ecx + 0x5f04]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4d80], 0
xor edi, edi
lea eax, [ebx + 0x4cf4]
mov dword [ebp - 0x20], eax
cmp dword [ebx + 0x4cec], edi
jle 0x405bf9
xor esi, esi
mov ecx, dword [eax]
add ecx, esi
call fcn.00401540
inc edi
lea eax, [ebx + 0x4cf4]
add esi, 0x1c
cmp edi, dword [ebx + 0x4cec]
jl 0x405bd6
lea eax, [ebx + 0x4cf4]
jmp 0x405bfc
mov dword [ebp - 0x20], eax
mov esi, dword [eax]
test esi, esi
je 0x405c78
mov ecx, dword [0x43b430]
mov dword [ebx + 0x4cf0], 0
mov dword [ebx + 0x4cec], 0
test ecx, ecx
je 0x405c65
movsx edx, word [ecx + 0x5f04]
lea eax, [ecx + 0x5f08]
mov edi, dword [ecx + 0x3f10]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x405c5b
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
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 + 0x4d10]
call fcn.00419720
xor edi, edi
cmp dword [ebx + 0x4d04], edi
jle 0x405ca9
xor esi, esi
nop
mov ecx, dword [ebx + 0x4d0c]
add ecx, esi
call fcn.0041a340
inc edi
add esi, 0x78
cmp edi, dword [ebx + 0x4d04]
jl 0x405c90
mov esi, dword [ebx + 0x4d0c]
test esi, esi
je 0x405d2e
mov ecx, dword [0x43b430]
mov dword [ebx + 0x4d08], 0
mov dword [ebx + 0x4d04], 0
test ecx, ecx
je 0x405d16
movsx edx, word [ecx + 0x5f04]
lea eax, [ecx + 0x5f08]
mov edi, dword [ecx + 0x3f10]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x405d0c
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
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 + 0x4d0c], 0
jmp 0x405d34
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4d3c]
call fcn.00401010
lea ecx, [ebx + 0x5d44]
call fcn.00401010
lea ecx, [ebx + 0x5d50]
call fcn.00401010
lea ecx, [ebx + 0x4dbc]
call fcn.00401010
lea ecx, [ebx + 0x4dc8]
call fcn.00401010
lea ecx, [ebx + 0x4dd4]
call fcn.00401010
lea ecx, [ebx + 0x5c34]
mov dword [ebx + 0x5c30], 0
call fcn.00401010
lea ecx, [ebx + 0x5dfc]
call fcn.00401010
mov eax, dword [ebx + 0x5df8]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x405e19
mov ecx, dword [0x43b430]
mov dword [ebx + 0x5df4], 0
mov dword [ebx + 0x5df0], 0
test ecx, ecx
je 0x405e09
movsx edx, word [ecx + 0x5f04]
lea eax, [ecx + 0x5f08]
mov edi, dword [ecx + 0x3f10]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x405dfc
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5f04], ax
cwde
add eax, 0xbe1
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5f00]
mov eax, dword [ebp - 0x28]
push eax
call esi
add esp, 4
mov dword [ebx + 0x5df8], 0
cmp dword [ebx + 0x5e4c], 0
je 0x405e4b
mov esi, dword [ebx + 0x5e4c]
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 0x405e41
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5e4c], 0
lea ecx, [ebx + 0x5e50]
call fcn.00401010
lea ecx, [ebx + 0x5e7c]
call fcn.00401010
lea ecx, [ebx + 0x5e88]
call fcn.00401010
mov dword [ebx + 0x5e94], 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