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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43a040
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x443040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x4434a8]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x10], 6
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x406f49
cmp byte [ebx + 1], 0
je 0x406f49
mov byte [eax + 0x10], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x406f49
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00427d00
mov ecx, esi
call fcn.00427f00
add esi, 0x3c
xor edx, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edx
cmp dword [esi], edx
jle 0x406ec3
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 0x406eab
mov ecx, esi
call fcn.0042a780
mov ecx, dword [0x4434a8]
test ecx, ecx
je 0x406e9f
movsx eax, word [ecx + 0x6024]
mov edx, dword [ecx + 0x3f70]
add eax, 0xc05
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x406e95
movsx eax, word [ecx + 0x6024]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
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 0x406e34
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ecx, esi
call fcn.00401d80
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x54]
mov byte [eax + 0x18], 0
call fcn.0041b5d0
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx + 0x48]
call fcn.0041b5d0
mov ecx, esi
call fcn.0041b5d0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x4434a8]
test ecx, ecx
je 0x406f41
movsx edx, word [ecx + 0x6024]
lea eax, [ecx + 0x6028]
mov esi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x406f37
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push dword [ebp - 0x14]
call edi
add esp, 4
lea ecx, [ebx + 0x3d90]
mov dword [ebx + 0x2c], 0
call fcn.00401d80
cmp byte [ebx], 0
je 0x40777f
cmp byte [ebx + 0x5ef8], 0
je 0x406fc0
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x406fc0
mov eax, dword [0x4434a8]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [eax + 0x5efc], 0
call fcn.0041a4a0
mov edx, 0x43c11c
mov dword [ebp - 0x28], eax
mov ecx, esi
call fcn.00404cd0
mov esi, eax
test esi, esi
je 0x406fc0
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 + 0x5f30]
mov esi, dword [ebx + 0x5f38]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov dword [ebp - 0x28], eax
cmp esi, eax
je 0x406ffa
nop dword [eax]
cmp dword [esi + 4], 6
jne 0x406ff3
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 0x406fe0
lea ecx, [ebx + 0x3fb8]
xor edx, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], edx
cmp dword [ecx], edx
jle 0x4070a7
mov ebx, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebx + 8]
mov esi, dword [ecx + eax]
test esi, esi
je 0x40708f
mov ecx, esi
call fcn.00407fa0
mov ecx, dword [0x4434a8]
test ecx, ecx
je 0x407083
movsx eax, word [ecx + 0x6024]
mov edx, dword [ecx + 0x3f70]
add eax, 0xc05
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x407079
movsx eax, word [ecx + 0x6024]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push esi
call edi
mov ecx, dword [ebp - 0x1c]
add esp, 4
mov edx, dword [ebp - 0x20]
inc edx
add ecx, 4
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
cmp edx, dword [ebx]
jl 0x407018
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
call fcn.00401d80
lea ecx, [ebx + 0x3fc4]
call fcn.00401d80
lea ecx, [ebx + 0x3fd0]
call fcn.00401d80
mov dword [ebx + 0x4004], 0
mov esi, dword [ebx + 0x3fe4]
test esi, esi
je 0x407154
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x3fe0], 0
mov dword [ebx + 0x3fdc], 0
test ecx, ecx
je 0x407144
movsx eax, word [ecx + 0x6024]
mov edx, dword [ecx + 0x3f70]
add eax, 0xc05
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40713a
movsx eax, word [ecx + 0x6024]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push esi
call edi
add esp, 4
mov dword [ebx + 0x3fe4], 0
lea ecx, [ebx + 0x3fe8]
call fcn.00401d80
or eax, 0xffffffff
mov dword [ebx + 0x4ad0], 0
mov dword [ebx + 0x400c], 0
lea edi, [ebx + 0x47fc]
mov dword [ebx + 0x4008], 0
mov ecx, 0x4d
mov dword [ebx + 0x4088], 0
mov dword [ebx + 0x4078], 0
mov dword [ebx + 0x4014], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x4930]
call fcn.00401d80
lea ecx, [ebx + 0x493c]
call fcn.00401d80
mov esi, dword [ebx + 0x4a60]
test esi, esi
je 0x407246
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x4a5c], 0
mov dword [ebx + 0x4a58], 0
test ecx, ecx
je 0x40722e
movsx edx, word [ecx + 0x6024]
lea eax, [ecx + 0x6028]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407224
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
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 + 0x4a60], 0
jmp 0x40724c
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [ebx + 0x4a6c]
test edi, edi
je 0x4072d4
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x4a68], 0
mov dword [ebx + 0x4a64], 0
test ecx, ecx
je 0x4072c4
movsx eax, word [ecx + 0x6024]
mov edx, dword [ecx + 0x3f70]
add eax, 0xc05
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x4072ba
movsx eax, word [ecx + 0x6024]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4a6c], 0
lea ecx, [ebx + 0x4a70]
call fcn.00401d80
lea ecx, [ebx + 0x4aa0]
call fcn.00401d80
lea ecx, [ebx + 0x4aac]
call fcn.00401d80
mov edi, dword [ebx + 0x4ac0]
test edi, edi
je 0x40737d
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x4abc], 0
mov dword [ebx + 0x4ab8], 0
test ecx, ecx
je 0x40736d
movsx eax, word [ecx + 0x6024]
mov edx, dword [ecx + 0x3f70]
add eax, 0xc05
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x407363
movsx eax, word [ecx + 0x6024]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4ac0], 0
lea ecx, [ebx + 0x4ac4]
call fcn.0041ba80
lea ecx, [ebx + 0x4dd0]
call fcn.0041b820
mov edi, dword [ebx + 0x4df8]
test edi, edi
je 0x40741b
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x4df4], 0
mov dword [ebx + 0x4df0], 0
test ecx, ecx
je 0x40740b
movsx eax, word [ecx + 0x6024]
mov edx, dword [ecx + 0x3f70]
add eax, 0xc05
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x407401
movsx eax, word [ecx + 0x6024]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4df8], 0
mov edi, dword [ebx + 0x4e04]
test edi, edi
je 0x4074a3
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x4e00], 0
mov dword [ebx + 0x4dfc], 0
test ecx, ecx
je 0x407493
movsx eax, word [ecx + 0x6024]
mov edx, dword [ecx + 0x3f70]
add eax, 0xc05
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x407489
movsx eax, word [ecx + 0x6024]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4e04], 0
xor edi, edi
lea eax, [ebx + 0x4d78]
mov dword [ebp - 0x24], eax
cmp dword [ebx + 0x4d70], edi
jle 0x4074e3
xor esi, esi
nop dword [eax + eax]
mov ecx, dword [eax]
add ecx, esi
call fcn.00402370
inc edi
lea eax, [ebx + 0x4d78]
add esi, 0x1c
cmp edi, dword [ebx + 0x4d70]
jl 0x4074c0
lea eax, [ebx + 0x4d78]
jmp 0x4074e6
mov dword [ebp - 0x24], eax
mov esi, dword [eax]
test esi, esi
je 0x407562
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x4d74], 0
mov dword [ebx + 0x4d70], 0
test ecx, ecx
je 0x40754f
movsx edx, word [ecx + 0x6024]
lea eax, [ecx + 0x6028]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407545
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x24]
add esp, 4
mov dword [eax], 0
lea ecx, [ebx + 0x4d94]
call fcn.0041b960
xor edi, edi
cmp dword [ebx + 0x4d88], edi
jle 0x407599
xor esi, esi
nop dword [eax]
mov ecx, dword [ebx + 0x4d90]
add ecx, esi
call fcn.0041c4d0
inc edi
add esi, 0x78
cmp edi, dword [ebx + 0x4d88]
jl 0x407580
mov esi, dword [ebx + 0x4d90]
test esi, esi
je 0x40761e
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x4d8c], 0
mov dword [ebx + 0x4d88], 0
test ecx, ecx
je 0x407606
movsx edx, word [ecx + 0x6024]
lea eax, [ecx + 0x6028]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x4075fc
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
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 + 0x4d90], 0
jmp 0x407624
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4dc0]
call fcn.00401d80
lea ecx, [ebx + 0x4e7c]
call fcn.0041b670
lea ecx, [ebx + 0x4e70]
call fcn.0041b770
lea ecx, [ebx + 0x5e60]
call fcn.00401d80
lea ecx, [ebx + 0x5e6c]
call fcn.00401d80
lea ecx, [ebx + 0x4ed4]
call fcn.00401d80
lea ecx, [ebx + 0x4ee0]
call fcn.00401d80
lea ecx, [ebx + 0x4eec]
call fcn.00401d80
lea ecx, [ebx + 0x5d50]
mov dword [ebx + 0x5d4c], 0
call fcn.00401d80
lea ecx, [ebx + 0x5f18]
call fcn.00401d80
mov eax, dword [ebx + 0x5f14]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x40771f
mov ecx, dword [0x4434a8]
mov dword [ebx + 0x5f10], 0
mov dword [ebx + 0x5f0c], 0
test ecx, ecx
je 0x40770f
movsx edx, word [ecx + 0x6024]
lea eax, [ecx + 0x6028]
mov edi, dword [ecx + 0x3f70]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407702
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6024], ax
cwde
add eax, 0xc05
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6020]
mov eax, dword [ebp - 0x28]
push eax
call esi
add esp, 4
mov dword [ebx + 0x5f14], 0
cmp dword [ebx + 0x5f6c], 0
je 0x407751
mov esi, dword [ebx + 0x5f6c]
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 0x407747
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5f6c], 0
lea ecx, [ebx + 0x5f70]
call fcn.00401d80
lea ecx, [ebx + 0x5f9c]
call fcn.00401d80
lea ecx, [ebx + 0x5fa8]
call fcn.00401d80
mov dword [ebx + 0x5fb4], 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