Function at 0x407b70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x445e90
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x44f040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x44f508]
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 0x407d0f
cmp byte [ebx + 1], 0
je 0x407d0f
mov byte [eax + 0x10], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x407d0f
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0042a190
mov ecx, esi
call fcn.0042a3a0
lea ecx, [esi + 0x3c]
xor esi, esi
mov dword [ebp - 0x14], ecx
cmp dword [ecx], esi
jle 0x407c83
mov eax, dword [ecx + 8]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x407c74
mov ecx, edi
call fcn.0042cc40
mov ecx, dword [0x44f508]
test ecx, ecx
je 0x407c63
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x18], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x407c59
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x18]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
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 0x407c7a
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
inc esi
cmp esi, dword [ecx]
jl 0x407bf7
call fcn.00402f30
mov esi, dword [ebp - 0x1c]
lea ecx, [esi + 0x54]
mov byte [esi + 0x18], 0
call fcn.0041d320
lea ecx, [esi + 0x48]
call fcn.0041d320
mov ecx, dword [ebp - 0x14]
call fcn.0041d320
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x44f508]
test ecx, ecx
je 0x407d09
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x407cff
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
push esi
call edi
add esp, 4
lea ecx, [ebx + 0x3d28]
mov dword [ebx + 0x2c], 0
call fcn.00402f30
cmp byte [ebx], 0
je 0x408566
cmp byte [ebx + 0x5da8], 0
je 0x407d8a
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x407d8a
mov eax, dword [0x44f508]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
mov dword [eax + 0x5dac], 0
call fcn.0041c270
mov edx, 0x44828c
mov ecx, esi
mov edi, eax
call fcn.00405ea0
mov esi, eax
test esi, esi
je 0x407d8a
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 + 0x5de0]
mov esi, dword [ebx + 0x5de8]
lea eax, [eax + eax*4]
lea edi, [esi + eax*4]
cmp esi, edi
je 0x407db7
cmp dword [esi + 4], 6
jne 0x407db0
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
add esp, 8
add esi, 0x14
cmp esi, edi
jne 0x407da0
lea ecx, [ebx + 0x3f40]
xor esi, esi
cmp dword [ecx], esi
jle 0x407e4c
mov eax, dword [ecx + 8]
mov edi, dword [eax + esi*4]
test edi, edi
je 0x407e43
mov ecx, edi
call fcn.00408d80
mov ecx, dword [0x44f508]
test ecx, ecx
je 0x407e33
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x407e29
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
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 0x407dc7
call fcn.00402f30
lea ecx, [ebx + 0x3f4c]
call fcn.00402f30
lea ecx, [ebx + 0x3f58]
call fcn.00402f30
mov dword [ebx + 0x3f8c], 0
mov esi, dword [ebx + 0x3f6c]
test esi, esi
je 0x407efb
mov ecx, dword [0x44f508]
mov dword [ebx + 0x3f68], 0
mov dword [ebx + 0x3f64], 0
test ecx, ecx
je 0x407ee3
movsx edx, word [ecx + 0x5ec8]
lea eax, [ecx + 0x5ecc]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407ed9
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
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 0x407f01
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x3f70]
call fcn.00402f30
or eax, 0xffffffff
mov dword [ebx + 0x4a3c], 0
mov dword [ebx + 0x3f94], 0
lea edi, [ebx + 0x477c]
mov dword [ebx + 0x3f90], 0
mov ecx, 0x4d
mov dword [ebx + 0x400c], 0
mov dword [ebx + 0x3ffc], 0
mov dword [ebx + 0x3f98], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x48b0]
call fcn.00402f30
lea ecx, [ebx + 0x48bc]
call fcn.00402f30
mov edi, dword [ebx + 0x49c8]
test edi, edi
je 0x407ffb
mov ecx, dword [0x44f508]
mov dword [ebx + 0x49c4], 0
mov dword [ebx + 0x49c0], 0
test ecx, ecx
je 0x407feb
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x407fe1
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
push edi
call esi
add esp, 4
mov dword [ebx + 0x49c8], 0
mov edi, dword [ebx + 0x49d4]
test edi, edi
je 0x408088
mov ecx, dword [0x44f508]
mov dword [ebx + 0x49d0], 0
mov dword [ebx + 0x49cc], 0
test ecx, ecx
je 0x408078
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x40806e
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
push edi
call esi
add esp, 4
mov dword [ebx + 0x49d4], 0
lea ecx, [ebx + 0x49d8]
call fcn.00402f30
lea ecx, [ebx + 0x4a08]
call fcn.00402f30
lea ecx, [ebx + 0x4a14]
call fcn.00402f30
mov edi, dword [ebx + 0x4a28]
test edi, edi
je 0x408136
mov ecx, dword [0x44f508]
mov dword [ebx + 0x4a24], 0
mov dword [ebx + 0x4a20], 0
test ecx, ecx
je 0x408126
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x40811c
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4a28], 0
lea ecx, [ebx + 0x4a30]
call fcn.0041d720
lea ecx, [ebx + 0x4d34]
call fcn.0041d3d0
mov edi, dword [ebx + 0x4d5c]
test edi, edi
je 0x4081d9
mov ecx, dword [0x44f508]
mov dword [ebx + 0x4d58], 0
mov dword [ebx + 0x4d54], 0
test ecx, ecx
je 0x4081c9
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x4081bf
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4d5c], 0
mov edi, dword [ebx + 0x4d68]
test edi, edi
je 0x408266
mov ecx, dword [0x44f508]
mov dword [ebx + 0x4d64], 0
mov dword [ebx + 0x4d60], 0
test ecx, ecx
je 0x408256
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x40824c
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4d68], 0
xor edi, edi
lea eax, [ebx + 0x4cdc]
mov dword [ebp - 0x14], eax
cmp dword [ebx + 0x4cd4], edi
jle 0x4082a3
xor esi, esi
nop dword [eax + eax]
mov ecx, dword [eax]
add ecx, esi
call fcn.00403480
inc edi
lea eax, [ebx + 0x4cdc]
add esi, 0x1c
cmp edi, dword [ebx + 0x4cd4]
jl 0x408280
lea eax, [ebx + 0x4cdc]
jmp 0x4082a6
mov dword [ebp - 0x14], eax
mov esi, dword [eax]
test esi, esi
je 0x40832b
mov ecx, dword [0x44f508]
mov dword [ebx + 0x4cd8], 0
mov dword [ebx + 0x4cd4], 0
test ecx, ecx
je 0x408314
movsx edx, word [ecx + 0x5ec8]
lea eax, [ecx + 0x5ecc]
mov edi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40830a
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
xor edx, edx
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
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 0x408331
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4cf8]
call fcn.0041d500
cmp dword [ebx + 0x4cec], 0
mov dword [ebp - 0x14], 0
jle 0x40838f
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov esi, dword [ebx + 0x4cf4]
add esi, ecx
lea ecx, [esi + 0x14]
mov dword [ebp - 4], 1
call fcn.00429b80
lea ecx, [esi + 0x1c]
call fcn.0041d320
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 + 0x4cec]
jl 0x408351
mov esi, dword [ebx + 0x4cf4]
test esi, esi
je 0x40841c
mov ecx, dword [0x44f508]
mov dword [ebx + 0x4cf0], 0
mov dword [ebx + 0x4cec], 0
test ecx, ecx
je 0x40840c
movsx eax, word [ecx + 0x5ec8]
mov edx, dword [ecx + 0x3f08]
mov dword [ebp - 0x1c], edx
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
cmp dword [eax], edx
je 0x408402
movsx eax, word [ecx + 0x5ec8]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x1c]
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
push esi
call edi
add esp, 4
mov dword [ebx + 0x4cf4], 0
lea ecx, [ebx + 0x4d24]
call fcn.00402f30
lea ecx, [ebx + 0x5d10]
call fcn.00402f30
lea ecx, [ebx + 0x5d1c]
call fcn.00402f30
lea ecx, [ebx + 0x4da4]
call fcn.00402f30
lea ecx, [ebx + 0x4db0]
call fcn.00402f30
lea ecx, [ebx + 0x4dbc]
call fcn.00402f30
lea ecx, [ebx + 0x5c10]
mov dword [ebx + 0x5c0c], 0
call fcn.00402f30
lea ecx, [ebx + 0x5dc8]
call fcn.00402f30
mov eax, dword [ebx + 0x5dc4]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x408506
mov ecx, dword [0x44f508]
mov dword [ebx + 0x5dc0], 0
mov dword [ebx + 0x5dbc], 0
test ecx, ecx
je 0x4084f6
movsx edx, word [ecx + 0x5ec8]
lea eax, [ecx + 0x5ecc]
mov esi, dword [ecx + 0x3f08]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x4084e9
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x5ec8], ax
cwde
lea eax, [eax*8 + 0x5ecc]
add eax, ecx
xor edx, edx
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5ec4]
mov eax, dword [ebp - 0x1c]
push eax
call edi
add esp, 4
mov dword [ebx + 0x5dc4], 0
cmp dword [ebx + 0x5e18], 0
je 0x408538
mov esi, dword [ebx + 0x5e18]
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 0x40852e
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5e18], 0
lea ecx, [ebx + 0x5e1c]
call fcn.00402f30
lea ecx, [ebx + 0x5e48]
call fcn.00402f30
lea ecx, [ebx + 0x5e54]
call fcn.00402f30
mov dword [ebx + 0x5e60], 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