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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4406b0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x449040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x449430]
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 0x40718b
cmp byte [ebx + 1], 0
je 0x40718b
mov byte [eax + 0x10], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x40718b
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00428d10
mov ecx, esi
call fcn.00428f20
add esi, 0x3c
xor edx, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edx
cmp dword [esi], edx
jle 0x407104
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 0x4070ec
mov ecx, esi
call fcn.0042b7f0
mov ecx, dword [0x449430]
test ecx, ecx
je 0x4070e0
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x4070d6
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
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 0x407074
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ecx, esi
call fcn.00401020
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x54]
mov byte [eax + 0x18], 0
call fcn.0041c390
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx + 0x48]
call fcn.0041c390
mov ecx, esi
call fcn.0041c390
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x449430]
test ecx, ecx
je 0x407183
movsx edx, word [ecx + 0x6008]
lea eax, [ecx + 0x600c]
mov esi, dword [ecx + 0x3f58]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x407179
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
xor edx, edx
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
push dword [ebp - 0x14]
call edi
add esp, 4
lea ecx, [ebx + 0x3d78]
mov dword [ebx + 0x2c], 0
call fcn.00401020
cmp byte [ebx], 0
je 0x4079d1
cmp byte [ebx + 0x5edc], 0
je 0x407202
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x407202
mov eax, dword [0x449430]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [eax + 0x5ee0], 0
call fcn.0041b460
mov edx, 0x442244
mov dword [ebp - 0x28], eax
mov ecx, esi
call fcn.00403fb0
mov esi, eax
test esi, esi
je 0x407202
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 + 0x5f14]
mov esi, dword [ebx + 0x5f1c]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov dword [ebp - 0x28], eax
cmp esi, eax
je 0x40723a
nop dword [eax + eax]
cmp dword [esi + 4], 6
jne 0x407233
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 0x407220
lea ecx, [ebx + 0x3fa0]
xor edx, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], edx
cmp dword [ecx], edx
jle 0x4072e8
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 0x4072d0
mov ecx, esi
call fcn.004081f0
mov ecx, dword [0x449430]
test ecx, ecx
je 0x4072c4
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x4072ba
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
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 0x407258
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
call fcn.00401020
lea ecx, [ebx + 0x3fac]
call fcn.00401020
lea ecx, [ebx + 0x3fb8]
call fcn.00401020
mov dword [ebx + 0x3fec], 0
mov esi, dword [ebx + 0x3fcc]
test esi, esi
je 0x407396
mov ecx, dword [0x449430]
mov dword [ebx + 0x3fc8], 0
mov dword [ebx + 0x3fc4], 0
test ecx, ecx
je 0x407386
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x40737c
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
push esi
call edi
add esp, 4
mov dword [ebx + 0x3fcc], 0
lea ecx, [ebx + 0x3fd0]
call fcn.00401020
or eax, 0xffffffff
mov dword [ebx + 0x4ab8], 0
mov dword [ebx + 0x3ff4], 0
lea edi, [ebx + 0x47e4]
mov dword [ebx + 0x3ff0], 0
mov ecx, 0x4d
mov dword [ebx + 0x4070], 0
mov dword [ebx + 0x4060], 0
mov dword [ebx + 0x3ffc], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x4918]
call fcn.00401020
lea ecx, [ebx + 0x4924]
call fcn.00401020
mov esi, dword [ebx + 0x4a48]
test esi, esi
je 0x407489
mov ecx, dword [0x449430]
mov dword [ebx + 0x4a44], 0
mov dword [ebx + 0x4a40], 0
test ecx, ecx
je 0x407471
movsx edx, word [ecx + 0x6008]
lea eax, [ecx + 0x600c]
mov edi, dword [ecx + 0x3f58]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407467
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
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 + 0x4a48], 0
jmp 0x40748f
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [ebx + 0x4a54]
test edi, edi
je 0x407518
mov ecx, dword [0x449430]
mov dword [ebx + 0x4a50], 0
mov dword [ebx + 0x4a4c], 0
test ecx, ecx
je 0x407508
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x4074fe
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4a54], 0
lea ecx, [ebx + 0x4a58]
call fcn.00401020
lea ecx, [ebx + 0x4a88]
call fcn.00401020
lea ecx, [ebx + 0x4a94]
call fcn.00401020
mov edi, dword [ebx + 0x4aa8]
test edi, edi
je 0x4075c2
mov ecx, dword [0x449430]
mov dword [ebx + 0x4aa4], 0
mov dword [ebx + 0x4aa0], 0
test ecx, ecx
je 0x4075b2
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x4075a8
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4aa8], 0
lea ecx, [ebx + 0x4aac]
call fcn.0041c9b0
lea ecx, [ebx + 0x4db8]
call fcn.0041c5f0
mov edi, dword [ebx + 0x4de0]
test edi, edi
je 0x407661
mov ecx, dword [0x449430]
mov dword [ebx + 0x4ddc], 0
mov dword [ebx + 0x4dd8], 0
test ecx, ecx
je 0x407651
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x407647
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4de0], 0
mov edi, dword [ebx + 0x4dec]
test edi, edi
je 0x4076ea
mov ecx, dword [0x449430]
mov dword [ebx + 0x4de8], 0
mov dword [ebx + 0x4de4], 0
test ecx, ecx
je 0x4076da
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x4076d0
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4dec], 0
cmp dword [ebx + 0x4d58], 0
lea eax, [ebx + 0x4d60]
mov dword [ebp - 0x24], eax
jle 0x40772c
xor edi, edi
xor esi, esi
mov ecx, dword [eax]
add ecx, 0x10
add ecx, edi
call fcn.0041c390
inc esi
lea eax, [ebx + 0x4d60]
add edi, 0x1c
cmp esi, dword [ebx + 0x4d58]
jl 0x407700
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea eax, [ebx + 0x4d60]
jmp 0x40772f
mov dword [ebp - 0x24], eax
mov edi, dword [eax]
test edi, edi
je 0x4077b3
mov ecx, dword [0x449430]
mov dword [ebx + 0x4d5c], 0
mov dword [ebx + 0x4d58], 0
test ecx, ecx
je 0x4077a4
movsx eax, word [ecx + 0x6008]
mov edx, dword [ecx + 0x3f58]
mov dword [ebp - 0x28], edx
lea eax, [eax*8 + 0x600c]
add eax, ecx
cmp dword [eax], edx
je 0x40779a
movsx eax, word [ecx + 0x6008]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
push edi
call esi
mov eax, dword [ebp - 0x24]
add esp, 4
mov dword [eax], 0
lea ecx, [ebx + 0x4d7c]
call fcn.0041c730
xor edi, edi
cmp dword [ebx + 0x4d70], edi
jle 0x4077e9
xor esi, esi
nop word [eax + eax]
mov ecx, dword [ebx + 0x4d78]
add ecx, esi
call fcn.0041d410
inc edi
add esi, 0x78
cmp edi, dword [ebx + 0x4d70]
jl 0x4077d0
mov esi, dword [ebx + 0x4d78]
test esi, esi
je 0x40786f
mov ecx, dword [0x449430]
mov dword [ebx + 0x4d74], 0
mov dword [ebx + 0x4d70], 0
test ecx, ecx
je 0x407857
movsx edx, word [ecx + 0x6008]
lea eax, [ecx + 0x600c]
mov edi, dword [ecx + 0x3f58]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40784d
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
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 + 0x4d78], 0
jmp 0x407875
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4da8]
call fcn.00401020
lea ecx, [ebx + 0x4e64]
call fcn.0041c440
lea ecx, [ebx + 0x4e58]
call fcn.0041c540
lea ecx, [ebx + 0x5e44]
call fcn.00401020
lea ecx, [ebx + 0x5e50]
call fcn.00401020
lea ecx, [ebx + 0x4ebc]
call fcn.00401020
lea ecx, [ebx + 0x4ec8]
call fcn.00401020
lea ecx, [ebx + 0x4ed4]
call fcn.00401020
lea ecx, [ebx + 0x5d34]
mov dword [ebx + 0x5d30], 0
call fcn.00401020
lea ecx, [ebx + 0x5efc]
call fcn.00401020
mov eax, dword [ebx + 0x5ef8]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x407971
mov ecx, dword [0x449430]
mov dword [ebx + 0x5ef4], 0
mov dword [ebx + 0x5ef0], 0
test ecx, ecx
je 0x407961
movsx edx, word [ecx + 0x6008]
lea eax, [ecx + 0x600c]
mov edi, dword [ecx + 0x3f58]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407954
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x6008], ax
cwde
lea eax, [eax*8 + 0x600c]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x6004]
mov eax, dword [ebp - 0x28]
push eax
call esi
add esp, 4
mov dword [ebx + 0x5ef8], 0
cmp dword [ebx + 0x5f50], 0
je 0x4079a3
mov esi, dword [ebx + 0x5f50]
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 0x407999
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5f50], 0
lea ecx, [ebx + 0x5f54]
call fcn.00401020
lea ecx, [ebx + 0x5f80]
call fcn.00401020
lea ecx, [ebx + 0x5f8c]
call fcn.00401020
mov dword [ebx + 0x5f98], 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