Function at 0x405d00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f960
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x438040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x438490]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [ebp - 0x10], 6
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x405e9f
cmp byte [ebx + 1], 0
je 0x405e9f
mov byte [eax + 0x10], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x405e9f
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.004256f0
mov ecx, esi
call fcn.00425900
lea ecx, [esi + 0x3c]
xor esi, esi
mov dword [ebp - 0x14], ecx
cmp dword [ecx], esi
jle 0x405e13
mov eax, dword [ecx + 8]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x405e04
mov ecx, edi
call fcn.004281a0
mov ecx, dword [0x438490]
test ecx, ecx
je 0x405df3
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x18], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x405de9
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x18]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push edi
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call edi
mov ecx, dword [ebp - 0x14]
add esp, 4
jmp 0x405e0a
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
cmp esi, dword [ecx]
jl 0x405d87
call fcn.00401e60
mov esi, dword [ebp - 0x1c]
lea ecx, [esi + 0x54]
mov byte [esi + 0x18], 0
call fcn.00418c90
lea ecx, [esi + 0x48]
call fcn.00418c90
mov ecx, dword [ebp - 0x14]
call fcn.00418c90
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x438490]
test ecx, ecx
je 0x405e99
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x405e8f
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push esi
call edi
add esp, 4
lea ecx, [ebx + 0x3d28]
mov dword [ebx + 0x2c], 0
call fcn.00401e60
cmp byte [ebx], 0
je 0x4066f6
cmp byte [ebx + 0x5d50], 0
je 0x405f1a
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x405f1a
mov eax, dword [0x438490]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
mov dword [eax + 0x5d54], 0
call fcn.00417be0
mov edx, 0x430f50
mov ecx, esi
mov edi, eax
call fcn.00404760
mov esi, eax
test esi, esi
je 0x405f1a
push esi
push dword [ebp - 0x14]
mov dword [ebp - 0x1c], 0
push 1
push edi
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 + 0x5d88]
mov esi, dword [ebx + 0x5d90]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x405f47
cmp dword [esi + 4], 6
jne 0x405f40
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x405f30
lea ecx, [ebx + 0x3f40]
xor esi, esi
cmp dword [ecx], esi
jle 0x405fdc
mov eax, dword [ecx + 8]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x405fd3
mov ecx, edi
call fcn.00406f10
mov ecx, dword [0x438490]
test ecx, ecx
je 0x405fc3
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x405fb9
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea ecx, [ebx + 0x3f40]
inc esi
cmp esi, dword [ecx]
jl 0x405f57
call fcn.00401e60
lea ecx, [ebx + 0x3f4c]
call fcn.00401e60
lea ecx, [ebx + 0x3f58]
call fcn.00401e60
mov dword [ebx + 0x3f88], 0
mov esi, dword [ebx + 0x3f6c]
test esi, esi
je 0x40608b
mov ecx, dword [0x438490]
mov dword [ebx + 0x3f68], 0
mov dword [ebx + 0x3f64], 0
test ecx, ecx
je 0x406073
movsx edx, word [ecx + 0x5e50]
lea eax, [ecx + 0x5e54]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x406069
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
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 + 0x3f6c], 0
jmp 0x406091
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x3f70]
call fcn.00401e60
or eax, 0xffffffff
mov dword [ebx + 0x4a00], 0
mov dword [ebx + 0x3f90], 0
lea edi, [ebx + 0x474c]
mov dword [ebx + 0x3f8c], 0
mov ecx, 0x4d
mov dword [ebx + 0x4008], 0
mov dword [ebx + 0x3ff4], 0
mov dword [ebx + 0x3f94], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x4880]
call fcn.00401e60
lea ecx, [ebx + 0x488c]
call fcn.00401e60
mov edi, dword [ebx + 0x498c]
test edi, edi
je 0x40618b
mov ecx, dword [0x438490]
mov dword [ebx + 0x4988], 0
mov dword [ebx + 0x4984], 0
test ecx, ecx
je 0x40617b
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x406171
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x498c], 0
mov edi, dword [ebx + 0x4998]
test edi, edi
je 0x406218
mov ecx, dword [0x438490]
mov dword [ebx + 0x4994], 0
mov dword [ebx + 0x4990], 0
test ecx, ecx
je 0x406208
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x4061fe
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4998], 0
lea ecx, [ebx + 0x499c]
call fcn.00401e60
lea ecx, [ebx + 0x49cc]
call fcn.00401e60
lea ecx, [ebx + 0x49d8]
call fcn.00401e60
mov edi, dword [ebx + 0x49ec]
test edi, edi
je 0x4062c6
mov ecx, dword [0x438490]
mov dword [ebx + 0x49e8], 0
mov dword [ebx + 0x49e4], 0
test ecx, ecx
je 0x4062b6
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x4062ac
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x49ec], 0
lea ecx, [ebx + 0x49f4]
call fcn.00418f90
lea ecx, [ebx + 0x4cdc]
call fcn.00418d40
mov edi, dword [ebx + 0x4d04]
test edi, edi
je 0x406369
mov ecx, dword [0x438490]
mov dword [ebx + 0x4d00], 0
mov dword [ebx + 0x4cfc], 0
test ecx, ecx
je 0x406359
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x40634f
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4d04], 0
mov edi, dword [ebx + 0x4d10]
test edi, edi
je 0x4063f6
mov ecx, dword [0x438490]
mov dword [ebx + 0x4d0c], 0
mov dword [ebx + 0x4d08], 0
test ecx, ecx
je 0x4063e6
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x4063dc
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4d10], 0
xor edi, edi
lea eax, [ebx + 0x4c88]
mov dword [ebp - 0x14], eax
cmp dword [ebx + 0x4c80], edi
jle 0x406433
xor esi, esi
nop dword [eax + eax]
mov ecx, dword [eax]
add ecx, esi
call fcn.00402390
inc edi
lea eax, [ebx + 0x4c88]
add esi, 0x1c
cmp edi, dword [ebx + 0x4c80]
jl 0x406410
lea eax, [ebx + 0x4c88]
jmp 0x406436
mov dword [ebp - 0x14], eax
mov esi, dword [eax]
test esi, esi
je 0x4064bb
mov ecx, dword [0x438490]
mov dword [ebx + 0x4c84], 0
mov dword [ebx + 0x4c80], 0
test ecx, ecx
je 0x4064a4
movsx edx, word [ecx + 0x5e50]
lea eax, [ecx + 0x5e54]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40649a
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
call edi
mov eax, dword [ebp - 0x14]
add esp, 4
mov dword [eax], 0
jmp 0x4064c1
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4ca0]
call fcn.00418e70
cmp dword [ebx + 0x4c94], 0
mov dword [ebp - 0x14], 0
jle 0x40651f
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov esi, dword [ebx + 0x4c9c]
add esi, ecx
lea ecx, [esi + 0x14]
mov dword [ebp - 4], 1
call fcn.004250e0
lea ecx, [esi + 0x1c]
call fcn.00418c90
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
add ecx, 0x6c
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
cmp eax, dword [ebx + 0x4c94]
jl 0x4064e1
mov esi, dword [ebx + 0x4c9c]
test esi, esi
je 0x4065ac
mov ecx, dword [0x438490]
mov dword [ebx + 0x4c98], 0
mov dword [ebx + 0x4c94], 0
test ecx, ecx
je 0x40659c
movsx eax, word [ecx + 0x5e50]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e54]
add eax, ecx
cmp dword [eax], edx
je 0x406592
movsx eax, word [ecx + 0x5e50]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
push esi
call edi
add esp, 4
mov dword [ebx + 0x4c9c], 0
lea ecx, [ebx + 0x4ccc]
call fcn.00401e60
lea ecx, [ebx + 0x5cb8]
call fcn.00401e60
lea ecx, [ebx + 0x5cc4]
call fcn.00401e60
lea ecx, [ebx + 0x4d4c]
call fcn.00401e60
lea ecx, [ebx + 0x4d58]
call fcn.00401e60
lea ecx, [ebx + 0x4d64]
call fcn.00401e60
lea ecx, [ebx + 0x5bb8]
mov dword [ebx + 0x5bb4], 0
call fcn.00401e60
lea ecx, [ebx + 0x5d70]
call fcn.00401e60
mov eax, dword [ebx + 0x5d6c]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x406696
mov ecx, dword [0x438490]
mov dword [ebx + 0x5d68], 0
mov dword [ebx + 0x5d64], 0
test ecx, ecx
je 0x406686
movsx edx, word [ecx + 0x5e50]
lea eax, [ecx + 0x5e54]
mov esi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x406679
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5e50], ax
cwde
lea eax, [eax*8 + 0x5e54]
add eax, ecx
xor edx, edx
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e4c]
mov eax, dword [ebp - 0x1c]
push eax
call edi
add esp, 4
mov dword [ebx + 0x5d6c], 0
cmp dword [ebx + 0x5dc0], 0
je 0x4066c8
mov esi, dword [ebx + 0x5dc0]
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 0x4066be
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5dc0], 0
lea ecx, [ebx + 0x5dc4]
call fcn.00401e60
lea ecx, [ebx + 0x5df0]
call fcn.00401e60
lea ecx, [ebx + 0x5dfc]
call fcn.00401e60
mov dword [ebx + 0x5e08], 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