Function at 0x408960
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x449040
push eax
mov dword fs:[0], esp
sub esp, 0x18
mov eax, dword [0x471270]
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push esi
push edi
mov edi, eax
mov ecx, dword [edi + 0x40]
test ecx, ecx
je 0x4089c4
cmp byte [edi + 1], 0
je 0x4089c4
mov byte [ecx + 0x10], 0
mov esi, dword [edi + 0x40]
test esi, esi
je 0x4089c4
mov ecx, esi
call fcn.00425910
mov eax, dword [0x471270]
test eax, eax
je 0x4089b9
dec dword [eax + 0xa8]
push esi
call ebx
mov eax, dword [0x471270]
add esp, 4
cmp byte [edi], 0
mov dword [edi + 0x40], 0
je 0x40926a
cmp byte [edi + 0x5205], 0
je 0x408a32
mov esi, dword [edi + 0x20]
test esi, esi
je 0x408a32
lea ecx, [ebp - 0x10]
mov dword [eax + 0x5208], 0
mov dword [ebp - 0x10], 0
call fcn.004190a0
mov edx, 0x44e5bc
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.00403470
mov esi, eax
test esi, esi
je 0x408a32
push esi
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], 0
push 1
push dword [ebp - 0x14]
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 edx, 6
mov ecx, edi
call fcn.00405d00
xor esi, esi
lea ecx, [edi + 0x3df0]
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3de8], esi
jle 0x408a8c
mov eax, dword [ecx]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x408a81
mov ecx, eax
call fcn.004053d0
mov eax, dword [0x471270]
test eax, eax
je 0x408a73
dec dword [eax + 0xa8]
push dword [ebp - 0x14]
call ebx
add esp, 4
lea ecx, [edi + 0x3df0]
inc esi
cmp esi, dword [edi + 0x3de8]
jl 0x408a51
jmp 0x408a8f
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x408ac7
mov eax, dword [0x471270]
mov dword [edi + 0x3dec], 0
mov dword [edi + 0x3de8], 0
test eax, eax
je 0x408ab8
dec dword [eax + 0xa8]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
mov ecx, dword [edi + 0x3dfc]
test ecx, ecx
je 0x408b04
mov eax, dword [0x471270]
mov dword [edi + 0x3df8], 0
mov dword [edi + 0x3df4], 0
test eax, eax
je 0x408af4
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3dfc], 0
mov ecx, dword [edi + 0x3e08]
test ecx, ecx
je 0x408b41
mov eax, dword [0x471270]
mov dword [edi + 0x3e04], 0
mov dword [edi + 0x3e00], 0
test eax, eax
je 0x408b31
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e08], 0
mov dword [edi + 0x3e30], 0
mov ecx, dword [edi + 0x3e14]
test ecx, ecx
je 0x408b88
mov eax, dword [0x471270]
mov dword [edi + 0x3e10], 0
mov dword [edi + 0x3e0c], 0
test eax, eax
je 0x408b78
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e14], 0
mov ecx, dword [edi + 0x3e20]
test ecx, ecx
je 0x408bc5
mov eax, dword [0x471270]
mov dword [edi + 0x3e1c], 0
mov dword [edi + 0x3e18], 0
test eax, eax
je 0x408bb5
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e20], 0
mov dword [edi + 0x3fe8], 0
mov dword [edi + 0x3e38], 0
mov dword [edi + 0x3e34], 0
mov dword [edi + 0x3e98], 0
mov dword [edi + 0x3e84], 0
mov dword [edi + 0x3e3c], 0
mov ecx, dword [edi + 0x3f80]
test ecx, ecx
je 0x408c3e
mov eax, dword [0x471270]
mov dword [edi + 0x3f7c], 0
mov dword [edi + 0x3f78], 0
test eax, eax
je 0x408c2e
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f80], 0
mov ecx, dword [edi + 0x3f8c]
test ecx, ecx
je 0x408c7b
mov eax, dword [0x471270]
mov dword [edi + 0x3f88], 0
mov dword [edi + 0x3f84], 0
test eax, eax
je 0x408c6b
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f8c], 0
mov ecx, dword [edi + 0x3f98]
test ecx, ecx
je 0x408cb8
mov eax, dword [0x471270]
mov dword [edi + 0x3f94], 0
mov dword [edi + 0x3f90], 0
test eax, eax
je 0x408ca8
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f98], 0
mov ecx, dword [edi + 0x3fc8]
test ecx, ecx
je 0x408cf5
mov eax, dword [0x471270]
mov dword [edi + 0x3fc4], 0
mov dword [edi + 0x3fc0], 0
test eax, eax
je 0x408ce5
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fc8], 0
mov ecx, dword [edi + 0x3fd4]
test ecx, ecx
je 0x408d32
mov eax, dword [0x471270]
mov dword [edi + 0x3fd0], 0
mov dword [edi + 0x3fcc], 0
test eax, eax
je 0x408d22
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fd4], 0
xor ecx, ecx
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3fdc], ecx
jle 0x408dec
mov eax, dword [edi + 0x3fe4]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x408ddc
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x408d7c
mov ecx, eax
call fcn.004010b0
mov eax, dword [0x471270]
test eax, eax
je 0x408d74
dec dword [eax + 0xa8]
push dword [ebp - 0x14]
call ebx
add esp, 4
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x408da4
mov ecx, eax
call fcn.004010b0
mov eax, dword [0x471270]
test eax, eax
je 0x408d9c
dec dword [eax + 0xa8]
push dword [ebp - 0x14]
call ebx
add esp, 4
push 0x41a430
push 2
push 0xc
lea eax, [esi + 0x64]
mov dword [ebp - 4], 0
push eax
call fcn.00447dd3
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x471270]
test eax, eax
je 0x408dd3
dec dword [eax + 0xa8]
push esi
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [edi + 0x3fdc]
jl 0x408d43
mov ecx, dword [edi + 0x3fe4]
test ecx, ecx
je 0x408e29
mov eax, dword [0x471270]
mov dword [edi + 0x3fe0], 0
mov dword [edi + 0x3fdc], 0
test eax, eax
je 0x408e19
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fe4], 0
lea ecx, [edi + 0x4248]
call fcn.00419dc0
mov ecx, dword [edi + 0x4270]
test ecx, ecx
je 0x408e71
mov eax, dword [0x471270]
mov dword [edi + 0x426c], 0
mov dword [edi + 0x4268], 0
test eax, eax
je 0x408e61
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4270], 0
mov ecx, dword [edi + 0x427c]
test ecx, ecx
je 0x408eae
mov eax, dword [0x471270]
mov dword [edi + 0x4278], 0
mov dword [edi + 0x4274], 0
test eax, eax
je 0x408e9e
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x427c], 0
xor esi, esi
cmp dword [edi + 0x41ec], esi
jle 0x408ef5
xor ecx, ecx
mov dword [ebp - 0x10], ecx
nop dword [eax]
mov eax, dword [edi + 0x41f4]
mov edx, dword [eax + ecx + 0x18]
test edx, edx
je 0x408ee6
mov eax, dword [0x471270]
test eax, eax
je 0x408edd
dec dword [eax + 0xa8]
push edx
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
inc esi
add ecx, 0x1c
mov dword [ebp - 0x10], ecx
cmp esi, dword [edi + 0x41ec]
jl 0x408ec0
mov ecx, dword [edi + 0x41f4]
test ecx, ecx
je 0x408f32
mov eax, dword [0x471270]
mov dword [edi + 0x41f0], 0
mov dword [edi + 0x41ec], 0
test eax, eax
je 0x408f22
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x41f4], 0
lea ecx, [edi + 0x420c]
call fcn.00419f10
cmp dword [edi + 0x4200], 0
mov dword [ebp - 0x10], 0
jle 0x408f96
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov esi, dword [edi + 0x4208]
add esi, ecx
lea ecx, [esi + 0x10]
call fcn.00425220
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x408f7e
mov eax, dword [0x471270]
test eax, eax
je 0x408f78
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
inc eax
add ecx, 0x68
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
cmp eax, dword [edi + 0x4200]
jl 0x408f52
mov ecx, dword [edi + 0x4208]
test ecx, ecx
je 0x408fd3
mov eax, dword [0x471270]
mov dword [edi + 0x4204], 0
mov dword [edi + 0x4200], 0
test eax, eax
je 0x408fc3
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4208], 0
mov ecx, dword [edi + 0x4240]
test ecx, ecx
je 0x409010
mov eax, dword [0x471270]
mov dword [edi + 0x423c], 0
mov dword [edi + 0x4238], 0
test eax, eax
je 0x409000
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4240], 0
mov ecx, dword [edi + 0x51d4]
test ecx, ecx
je 0x40904d
mov eax, dword [0x471270]
mov dword [edi + 0x51d0], 0
mov dword [edi + 0x51cc], 0
test eax, eax
je 0x40903d
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x51d4], 0
mov ecx, dword [edi + 0x51e0]
test ecx, ecx
je 0x40908a
mov eax, dword [0x471270]
mov dword [edi + 0x51dc], 0
mov dword [edi + 0x51d8], 0
test eax, eax
je 0x40907a
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x51e0], 0
mov ecx, dword [edi + 0x429c]
test ecx, ecx
je 0x4090c7
mov eax, dword [0x471270]
mov dword [edi + 0x4298], 0
mov dword [edi + 0x4294], 0
test eax, eax
je 0x4090b7
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x429c], 0
mov ecx, dword [edi + 0x42a8]
test ecx, ecx
je 0x409104
mov eax, dword [0x471270]
mov dword [edi + 0x42a4], 0
mov dword [edi + 0x42a0], 0
test eax, eax
je 0x4090f4
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x42a8], 0
mov ecx, dword [edi + 0x42b4]
test ecx, ecx
je 0x409141
mov eax, dword [0x471270]
mov dword [edi + 0x42b0], 0
mov dword [edi + 0x42ac], 0
test eax, eax
je 0x409131
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x42b4], 0
mov ecx, dword [edi + 0x522c]
test ecx, ecx
je 0x40917e
mov eax, dword [0x471270]
mov dword [edi + 0x5228], 0
mov dword [edi + 0x5224], 0
test eax, eax
je 0x40916e
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x522c], 0
mov ecx, dword [edi + 0x5220]
test ecx, ecx
je 0x4091bb
mov eax, dword [0x471270]
mov dword [edi + 0x521c], 0
mov dword [edi + 0x5218], 0
test eax, eax
je 0x4091ab
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5220], 0
cmp dword [edi + 0x5254], 0
je 0x4091ed
mov esi, dword [edi + 0x5254]
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 0x4091e3
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x5254], 0
mov ecx, dword [edi + 0x5260]
test ecx, ecx
je 0x40922a
mov eax, dword [0x471270]
mov dword [edi + 0x525c], 0
mov dword [edi + 0x5258], 0
test eax, eax
je 0x40921a
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5260], 0
mov ecx, dword [edi + 0x528c]
test ecx, ecx
je 0x409267
mov eax, dword [0x471270]
mov dword [edi + 0x5288], 0
mov dword [edi + 0x5284], 0
test eax, eax
je 0x409257
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x528c], 0
mov byte [edi], 0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret