Function at 0x407f50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [0x4dca24]
push esi
push edi
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x407f78
cmp byte [ebx + 1], 0
je 0x407f78
mov byte [eax + 0x10], 0
mov ecx, dword [ebx + 0x2c]
call fcn.0042bc00
lea ecx, [ebx + 0x3d28]
mov dword [ebx + 0x2c], 0
call fcn.00401050
cmp byte [ebx], 0
je 0x4087b4
cmp byte [ebx + 0x5d1c], 0
je 0x407fec
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x407fec
mov eax, dword [0x4dca24]
lea ecx, [ebp - 4]
mov dword [ebp - 4], 0
mov dword [eax + 0x5d20], 0
call fcn.004203c0
mov edx, 0x4b8204
mov ecx, esi
mov edi, eax
call fcn.00403ff0
mov esi, eax
test esi, esi
je 0x407fec
push esi
push dword [ebp - 4]
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 + 0x5d54]
mov esi, dword [ebx + 0x5d5c]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x408019
cmp dword [esi + 4], 6
jne 0x408012
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x408002
lea ecx, [ebx + 0x3f40]
mov dword [ebp - 4], 6
xor esi, esi
cmp dword [ecx], esi
jle 0x4080b0
mov eax, dword [ecx + 8]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x4080ab
mov ecx, edi
call fcn.00408f80
mov ecx, dword [0x4dca24]
test ecx, ecx
je 0x40809b
movsx eax, word [ecx + 0x5e1c]
mov edx, dword [ecx + 0x3f08]
add eax, 0xbc4
mov dword [ebp - 0xc], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x408091
movsx eax, word [ecx + 0x5e1c]
inc eax
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov edx, dword [ebp - 0xc]
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
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 0x408030
call fcn.00401050
lea ecx, [ebx + 0x3f4c]
call fcn.00401050
lea ecx, [ebx + 0x3f58]
call fcn.00401050
mov dword [ebx + 0x3f88], 0
mov esi, dword [ebx + 0x3f6c]
test esi, esi
je 0x40815e
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x3f68], 0
mov dword [ebx + 0x3f64], 0
test ecx, ecx
je 0x408146
movsx edx, word [ecx + 0x5e1c]
lea eax, [ecx + 0x5e20]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40813c
lea eax, [edx + 1]
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
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 0x408164
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x3f70]
call fcn.00401050
or eax, 0xffffffff
mov dword [ebx + 0x49ec], 0
mov dword [ebx + 0x3f90], 0
lea edi, [ebx + 0x4748]
mov dword [ebx + 0x3f8c], 0
mov ecx, 0x4d
mov dword [ebx + 0x4004], 0
mov dword [ebx + 0x3ff0], 0
mov dword [ebx + 0x3f94], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x487c]
call fcn.00401050
lea ecx, [ebx + 0x4888]
call fcn.00401050
mov edi, dword [ebx + 0x4978]
test edi, edi
je 0x40825d
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x4974], 0
mov dword [ebx + 0x4970], 0
test ecx, ecx
je 0x40824d
movsx eax, word [ecx + 0x5e1c]
mov edx, dword [ecx + 0x3f08]
add eax, 0xbc4
mov dword [ebp - 0xc], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x408243
movsx eax, word [ecx + 0x5e1c]
inc eax
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov edx, dword [ebp - 0xc]
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4978], 0
mov edi, dword [ebx + 0x4984]
test edi, edi
je 0x4082e9
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x4980], 0
mov dword [ebx + 0x497c], 0
test ecx, ecx
je 0x4082d9
movsx eax, word [ecx + 0x5e1c]
mov edx, dword [ecx + 0x3f08]
add eax, 0xbc4
mov dword [ebp - 0xc], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x4082cf
movsx eax, word [ecx + 0x5e1c]
inc eax
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov edx, dword [ebp - 0xc]
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4984], 0
lea ecx, [ebx + 0x4988]
call fcn.00401050
lea ecx, [ebx + 0x49b8]
call fcn.00401050
lea ecx, [ebx + 0x49c4]
call fcn.00401050
mov edi, dword [ebx + 0x49d8]
test edi, edi
je 0x408396
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x49d4], 0
mov dword [ebx + 0x49d0], 0
test ecx, ecx
je 0x408386
movsx eax, word [ecx + 0x5e1c]
mov edx, dword [ecx + 0x3f08]
add eax, 0xbc4
mov dword [ebp - 0xc], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40837c
movsx eax, word [ecx + 0x5e1c]
inc eax
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov edx, dword [ebp - 0xc]
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
push edi
call esi
add esp, 4
mov dword [ebx + 0x49d8], 0
lea ecx, [ebx + 0x49e0]
call fcn.0042aa70
lea ecx, [ebx + 0x4cbc]
call fcn.0042a5c0
mov edi, dword [ebx + 0x4ce4]
test edi, edi
je 0x408438
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x4ce0], 0
mov dword [ebx + 0x4cdc], 0
test ecx, ecx
je 0x408428
movsx eax, word [ecx + 0x5e1c]
mov edx, dword [ecx + 0x3f08]
add eax, 0xbc4
mov dword [ebp - 0xc], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40841e
movsx eax, word [ecx + 0x5e1c]
inc eax
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov edx, dword [ebp - 0xc]
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4ce4], 0
mov edi, dword [ebx + 0x4cf0]
test edi, edi
je 0x4084c4
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x4cec], 0
mov dword [ebx + 0x4ce8], 0
test ecx, ecx
je 0x4084b4
movsx eax, word [ecx + 0x5e1c]
mov edx, dword [ecx + 0x3f08]
add eax, 0xbc4
mov dword [ebp - 0xc], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x4084aa
movsx eax, word [ecx + 0x5e1c]
inc eax
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov edx, dword [ebp - 0xc]
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4cf0], 0
xor edi, edi
lea eax, [ebx + 0x4c68]
mov dword [ebp - 8], eax
cmp dword [ebx + 0x4c60], edi
jle 0x408506
xor esi, esi
nop dword [eax]
mov ecx, dword [eax]
add ecx, 0x10
add ecx, esi
call fcn.004029e0
inc edi
lea eax, [ebx + 0x4c68]
add esi, 0x1c
cmp edi, dword [ebx + 0x4c60]
jl 0x4084e0
lea eax, [ebx + 0x4c68]
jmp 0x408509
mov dword [ebp - 8], eax
mov esi, dword [eax]
test esi, esi
je 0x408585
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x4c64], 0
mov dword [ebx + 0x4c60], 0
test ecx, ecx
je 0x408572
movsx edx, word [ecx + 0x5e1c]
lea eax, [ecx + 0x5e20]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x408568
lea eax, [edx + 1]
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 8]
add esp, 4
mov dword [eax], 0
lea ecx, [ebx + 0x4c80]
call fcn.0042a6f0
cmp dword [ebx + 0x4c74], 0
lea eax, [ebx + 0x4c7c]
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
jle 0x4085e6
xor edi, edi
nop dword [eax + eax]
mov esi, dword [eax]
lea ecx, [edi + 0x14]
add ecx, esi
call fcn.00461c50
lea ecx, [edi + 0x1c]
add ecx, esi
call fcn.004029e0
mov eax, dword [ebp - 8]
lea edi, [edi + 0x6c]
inc eax
cmp eax, dword [ebx + 0x4c74]
mov dword [ebp - 8], eax
lea eax, [ebx + 0x4c7c]
jl 0x4085b0
lea eax, [ebx + 0x4c7c]
jmp 0x4085e9
mov dword [ebp - 0xc], eax
mov esi, dword [eax]
test esi, esi
je 0x408669
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x4c78], 0
mov dword [ebx + 0x4c74], 0
test ecx, ecx
je 0x408652
movsx edx, word [ecx + 0x5e1c]
lea eax, [ecx + 0x5e20]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x408648
lea eax, [edx + 1]
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
mov eax, dword [ebp - 0xc]
add esp, 4
mov dword [eax], 0
jmp 0x40866f
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4cac]
call fcn.00401050
lea ecx, [ebx + 0x5c84]
call fcn.00401050
lea ecx, [ebx + 0x5c90]
call fcn.00401050
lea ecx, [ebx + 0x4d2c]
call fcn.00401050
lea ecx, [ebx + 0x4d38]
call fcn.00401050
lea ecx, [ebx + 0x4d44]
call fcn.00401050
lea ecx, [ebx + 0x5b98]
mov dword [ebx + 0x5b94], 0
call fcn.00401050
lea ecx, [ebx + 0x5d3c]
call fcn.00401050
mov eax, dword [ebx + 0x5d38]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x408754
mov ecx, dword [0x4dca24]
mov dword [ebx + 0x5d34], 0
mov dword [ebx + 0x5d30], 0
test ecx, ecx
je 0x408744
movsx edx, word [ecx + 0x5e1c]
lea eax, [ecx + 0x5e20]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x408737
lea eax, [edx + 1]
cdq
idiv dword [ebp - 4]
movzx eax, dx
mov word [ecx + 0x5e1c], ax
cwde
add eax, 0xbc4
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e18]
mov eax, dword [ebp - 0xc]
push eax
call esi
add esp, 4
mov dword [ebx + 0x5d38], 0
cmp dword [ebx + 0x5d8c], 0
je 0x408786
mov esi, dword [ebx + 0x5d8c]
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 0x40877c
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5d8c], 0
lea ecx, [ebx + 0x5d90]
call fcn.00401050
lea ecx, [ebx + 0x5dbc]
call fcn.00401050
lea ecx, [ebx + 0x5dc8]
call fcn.00401050
mov dword [ebx + 0x5dd4], 0
mov byte [ebx], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret