Function at 0x406730
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443a60
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x44c00c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x44c428]
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 0x4068cf
cmp byte [ebx + 1], 0
je 0x4068cf
mov byte [eax + 0x10], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x4068cf
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.00427f10
mov ecx, esi
call fcn.00428120
lea ecx, [esi + 0x3c]
xor esi, esi
mov dword [ebp - 0x14], ecx
cmp dword [ecx], esi
jle 0x406843
mov eax, dword [ecx + 8]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x406834
mov ecx, edi
call fcn.0042a9c0
mov ecx, dword [0x44c428]
test ecx, ecx
je 0x406823
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x18], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x406819
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x18]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
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 0x40683a
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
cmp esi, dword [ecx]
jl 0x4067b7
call fcn.00401e10
mov esi, dword [ebp - 0x1c]
lea ecx, [esi + 0x54]
mov byte [esi + 0x18], 0
call fcn.0041b4a0
lea ecx, [esi + 0x48]
call fcn.0041b4a0
mov ecx, dword [ebp - 0x14]
call fcn.0041b4a0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x44c428]
test ecx, ecx
je 0x4068c9
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x4068bf
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
push esi
call edi
add esp, 4
lea ecx, [ebx + 0x3d28]
mov dword [ebx + 0x2c], 0
call fcn.00401e10
cmp byte [ebx], 0
je 0x407134
cmp byte [ebx + 0x5d30], 0
je 0x40694a
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x40694a
mov eax, dword [0x44c428]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
mov dword [eax + 0x5d34], 0
call fcn.0041a3e0
mov edx, 0x4450dc
mov ecx, esi
mov edi, eax
call fcn.00404c10
mov esi, eax
test esi, esi
je 0x40694a
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 + 0x5d68]
mov esi, dword [ebx + 0x5d70]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x406977
cmp dword [esi + 4], 6
jne 0x406970
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x406960
lea ecx, [ebx + 0x3f40]
xor esi, esi
cmp dword [ecx], esi
jle 0x406a0c
mov eax, dword [ecx + 8]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x406a03
mov ecx, edi
call fcn.00407950
mov ecx, dword [0x44c428]
test ecx, ecx
je 0x4069f3
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x4069e9
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
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 0x406987
call fcn.00401e10
lea ecx, [ebx + 0x3f4c]
call fcn.00401e10
lea ecx, [ebx + 0x3f58]
call fcn.00401e10
mov dword [ebx + 0x3f88], 0
mov esi, dword [ebx + 0x3f6c]
test esi, esi
je 0x406abb
mov ecx, dword [0x44c428]
mov dword [ebx + 0x3f68], 0
mov dword [ebx + 0x3f64], 0
test ecx, ecx
je 0x406aa3
movsx edx, word [ecx + 0x5e30]
lea eax, [ecx + 0x5e34]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x406a99
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
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 0x406ac1
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x3f70]
call fcn.00401e10
or eax, 0xffffffff
mov dword [ebx + 0x49f0], 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.00401e10
lea ecx, [ebx + 0x488c]
call fcn.00401e10
mov edi, dword [ebx + 0x497c]
test edi, edi
je 0x406bbb
mov ecx, dword [0x44c428]
mov dword [ebx + 0x4978], 0
mov dword [ebx + 0x4974], 0
test ecx, ecx
je 0x406bab
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x406ba1
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x497c], 0
mov edi, dword [ebx + 0x4988]
test edi, edi
je 0x406c48
mov ecx, dword [0x44c428]
mov dword [ebx + 0x4984], 0
mov dword [ebx + 0x4980], 0
test ecx, ecx
je 0x406c38
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x406c2e
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4988], 0
lea ecx, [ebx + 0x498c]
call fcn.00401e10
lea ecx, [ebx + 0x49bc]
call fcn.00401e10
lea ecx, [ebx + 0x49c8]
call fcn.00401e10
mov edi, dword [ebx + 0x49dc]
test edi, edi
je 0x406cf6
mov ecx, dword [0x44c428]
mov dword [ebx + 0x49d8], 0
mov dword [ebx + 0x49d4], 0
test ecx, ecx
je 0x406ce6
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x406cdc
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x49dc], 0
lea ecx, [ebx + 0x49e4]
call fcn.0041b8a0
lea ecx, [ebx + 0x4cbc]
call fcn.0041b550
mov edi, dword [ebx + 0x4ce4]
test edi, edi
je 0x406d99
mov ecx, dword [0x44c428]
mov dword [ebx + 0x4ce0], 0
mov dword [ebx + 0x4cdc], 0
test ecx, ecx
je 0x406d89
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x406d7f
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4ce4], 0
mov edi, dword [ebx + 0x4cf0]
test edi, edi
je 0x406e26
mov ecx, dword [0x44c428]
mov dword [ebx + 0x4cec], 0
mov dword [ebx + 0x4ce8], 0
test ecx, ecx
je 0x406e16
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
je 0x406e0c
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4cf0], 0
xor edi, edi
lea eax, [ebx + 0x4c68]
mov dword [ebp - 0x14], eax
cmp dword [ebx + 0x4c60], edi
jle 0x406e63
xor esi, esi
nop dword [eax + eax]
mov ecx, dword [eax]
add ecx, esi
call fcn.004022f0
inc edi
lea eax, [ebx + 0x4c68]
add esi, 0x1c
cmp edi, dword [ebx + 0x4c60]
jl 0x406e40
lea eax, [ebx + 0x4c68]
jmp 0x406e66
mov dword [ebp - 0x14], eax
mov esi, dword [eax]
test esi, esi
je 0x406eeb
mov ecx, dword [0x44c428]
mov dword [ebx + 0x4c64], 0
mov dword [ebx + 0x4c60], 0
test ecx, ecx
je 0x406ed4
movsx edx, word [ecx + 0x5e30]
lea eax, [ecx + 0x5e34]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x406eca
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
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 0x406ef1
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4c80]
call fcn.0041b680
cmp dword [ebx + 0x4c74], 0
lea esi, [ebx + 0x4c7c]
mov dword [ebp - 0x14], 0
jle 0x406f5d
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov esi, dword [esi]
add esi, ecx
lea ecx, [esi + 0x14]
mov dword [ebp - 4], 1
call fcn.00427900
lea ecx, [esi + 0x1c]
call fcn.0041b4a0
mov ecx, dword [ebp - 0x18]
lea esi, [ebx + 0x4c7c]
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 + 0x4c74]
jl 0x406f17
lea esi, [ebx + 0x4c7c]
mov edx, dword [esi]
mov dword [ebp - 0x14], edx
test edx, edx
je 0x406fee
mov ecx, dword [0x44c428]
mov dword [ebx + 0x4c78], 0
mov dword [ebx + 0x4c74], 0
test ecx, ecx
je 0x406fe2
mov eax, dword [ecx + 0x3f08]
mov dword [ebp - 0x18], eax
movsx eax, word [ecx + 0x5e30]
mov edx, dword [ebp - 0x18]
lea eax, [eax*8 + 0x5e34]
add eax, ecx
cmp dword [eax], edx
mov edx, dword [ebp - 0x14]
je 0x406fd8
movsx eax, word [ecx + 0x5e30]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x18]
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
mov edx, dword [ebp - 0x14]
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
push edx
call edi
add esp, 4
mov dword [esi], 0
lea ecx, [ebx + 0x4cac]
call fcn.00401e10
lea ecx, [ebx + 0x5c98]
call fcn.00401e10
lea ecx, [ebx + 0x5ca4]
call fcn.00401e10
lea ecx, [ebx + 0x4d2c]
call fcn.00401e10
lea ecx, [ebx + 0x4d38]
call fcn.00401e10
lea ecx, [ebx + 0x4d44]
call fcn.00401e10
lea ecx, [ebx + 0x5b98]
mov dword [ebx + 0x5b94], 0
call fcn.00401e10
lea ecx, [ebx + 0x5d50]
call fcn.00401e10
mov eax, dword [ebx + 0x5d4c]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4070d4
mov ecx, dword [0x44c428]
mov dword [ebx + 0x5d48], 0
mov dword [ebx + 0x5d44], 0
test ecx, ecx
je 0x4070c4
movsx edx, word [ecx + 0x5e30]
lea eax, [ecx + 0x5e34]
mov esi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x4070b7
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5e30], ax
cwde
lea eax, [eax*8 + 0x5e34]
add eax, ecx
xor edx, edx
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5e2c]
mov eax, dword [ebp - 0x1c]
push eax
call edi
add esp, 4
mov dword [ebx + 0x5d4c], 0
cmp dword [ebx + 0x5da0], 0
je 0x407106
mov esi, dword [ebx + 0x5da0]
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 0x4070fc
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5da0], 0
lea ecx, [ebx + 0x5da4]
call fcn.00401e10
lea ecx, [ebx + 0x5dd0]
call fcn.00401e10
lea ecx, [ebx + 0x5ddc]
call fcn.00401e10
mov dword [ebx + 0x5de8], 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