Function at 0x408ea0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x490020
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4fe040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [0x4feb00]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [edi + 0x48]
test eax, eax
je 0x408f08
cmp byte [edi + 1], 0
je 0x408f08
mov byte [eax + 0x10], 0
mov esi, dword [edi + 0x48]
test esi, esi
je 0x408f08
mov ecx, esi
call fcn.00423860
mov eax, dword [0x4feb00]
test eax, eax
je 0x408f02
dec dword [eax + 0xb0]
push esi
call ebx
add esp, 4
mov dword [edi + 0x48], 0
mov ecx, dword [edi + 0x3bf0]
test ecx, ecx
je 0x408f4c
mov eax, dword [0x4feb00]
mov dword [edi + 0x3bec], 0
mov dword [edi + 0x3be8], 0
test eax, eax
je 0x408f3c
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3bf0], 0
cmp byte [edi], 0
je 0x409846
cmp byte [edi + 0x5215], 0
je 0x408fb8
mov esi, dword [edi + 0x20]
test esi, esi
je 0x408fb8
mov eax, dword [0x4feb00]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
mov dword [eax + 0x5218], 0
call fcn.00416b40
mov edx, 0x49f2a8
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.00403460
mov esi, eax
test esi, esi
je 0x408fb8
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
xor esi, esi
cmp dword [edi + 0x524c], esi
jle 0x408ffa
xor ecx, ecx
mov dword [ebp - 0x10], ecx
nop word [eax + eax]
mov edx, dword [edi + 0x5254]
add edx, ecx
cmp dword [edx + 4], 6
jne 0x408feb
mov eax, dword [edx + 0xc]
push edx
push edi
call eax
mov ecx, dword [ebp - 0x10]
add esp, 8
inc esi
add ecx, 0x14
mov dword [ebp - 0x10], ecx
cmp esi, dword [edi + 0x524c]
jl 0x408fd0
xor esi, esi
lea ecx, [edi + 0x3de8]
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3de0], esi
jle 0x40904b
nop dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x409040
mov ecx, eax
call fcn.00405b80
mov eax, dword [0x4feb00]
test eax, eax
je 0x409032
dec dword [eax + 0xb0]
push dword [ebp - 0x14]
call ebx
add esp, 4
lea ecx, [edi + 0x3de8]
inc esi
cmp esi, dword [edi + 0x3de0]
jl 0x409010
jmp 0x40904e
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x409086
mov eax, dword [0x4feb00]
mov dword [edi + 0x3de4], 0
mov dword [edi + 0x3de0], 0
test eax, eax
je 0x409077
dec dword [eax + 0xb0]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
mov ecx, dword [edi + 0x3df4]
test ecx, ecx
je 0x4090c3
mov eax, dword [0x4feb00]
mov dword [edi + 0x3df0], 0
mov dword [edi + 0x3dec], 0
test eax, eax
je 0x4090b3
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3df4], 0
mov ecx, dword [edi + 0x3e00]
test ecx, ecx
je 0x409100
mov eax, dword [0x4feb00]
mov dword [edi + 0x3dfc], 0
mov dword [edi + 0x3df8], 0
test eax, eax
je 0x4090f0
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e00], 0
mov dword [edi + 0x3e28], 0
mov ecx, dword [edi + 0x3e0c]
test ecx, ecx
je 0x409147
mov eax, dword [0x4feb00]
mov dword [edi + 0x3e08], 0
mov dword [edi + 0x3e04], 0
test eax, eax
je 0x409137
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e0c], 0
mov ecx, dword [edi + 0x3e18]
test ecx, ecx
je 0x409184
mov eax, dword [0x4feb00]
mov dword [edi + 0x3e14], 0
mov dword [edi + 0x3e10], 0
test eax, eax
je 0x409174
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e18], 0
mov dword [edi + 0x3fdc], 0
mov dword [edi + 0x3e30], 0
mov dword [edi + 0x3e2c], 0
mov dword [edi + 0x3e90], 0
mov dword [edi + 0x3e7c], 0
mov dword [edi + 0x3e34], 0
mov ecx, dword [edi + 0x3f74]
test ecx, ecx
je 0x4091fd
mov eax, dword [0x4feb00]
mov dword [edi + 0x3f70], 0
mov dword [edi + 0x3f6c], 0
test eax, eax
je 0x4091ed
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f74], 0
mov ecx, dword [edi + 0x3f80]
test ecx, ecx
je 0x40923a
mov eax, dword [0x4feb00]
mov dword [edi + 0x3f7c], 0
mov dword [edi + 0x3f78], 0
test eax, eax
je 0x40922a
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f80], 0
mov ecx, dword [edi + 0x3f8c]
test ecx, ecx
je 0x409277
mov eax, dword [0x4feb00]
mov dword [edi + 0x3f88], 0
mov dword [edi + 0x3f84], 0
test eax, eax
je 0x409267
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f8c], 0
mov ecx, dword [edi + 0x3fbc]
test ecx, ecx
je 0x4092b4
mov eax, dword [0x4feb00]
mov dword [edi + 0x3fb8], 0
mov dword [edi + 0x3fb4], 0
test eax, eax
je 0x4092a4
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fbc], 0
mov ecx, dword [edi + 0x3fc8]
test ecx, ecx
je 0x4092f1
mov eax, dword [0x4feb00]
mov dword [edi + 0x3fc4], 0
mov dword [edi + 0x3fc0], 0
test eax, eax
je 0x4092e1
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fc8], 0
xor ecx, ecx
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3fd0], ecx
jle 0x4093af
mov eax, dword [edi + 0x3fd8]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x40939f
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x409342
mov ecx, eax
call fcn.004010c0
mov eax, dword [0x4feb00]
test eax, eax
je 0x40933a
dec dword [eax + 0xb0]
push dword [ebp - 0x14]
call ebx
add esp, 4
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40936a
mov ecx, eax
call fcn.004010c0
mov eax, dword [0x4feb00]
test eax, eax
je 0x409362
dec dword [eax + 0xb0]
push dword [ebp - 0x14]
call ebx
add esp, 4
push 0x417630
push 2
push 0xc
lea eax, [esi + 0x64]
mov byte [ebp - 4], 1
push eax
call fcn.0043e800
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x4feb00]
test eax, eax
je 0x409396
dec dword [eax + 0xb0]
push esi
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [edi + 0x3fd0]
jl 0x409302
mov ecx, dword [edi + 0x3fd8]
test ecx, ecx
je 0x4093ec
mov eax, dword [0x4feb00]
mov dword [edi + 0x3fd4], 0
mov dword [edi + 0x3fd0], 0
test eax, eax
je 0x4093dc
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3fd8], 0
lea ecx, [edi + 0x424c]
call fcn.00417690
mov ecx, dword [edi + 0x4274]
test ecx, ecx
je 0x409434
mov eax, dword [0x4feb00]
mov dword [edi + 0x4270], 0
mov dword [edi + 0x426c], 0
test eax, eax
je 0x409424
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4274], 0
mov ecx, dword [edi + 0x4280]
test ecx, ecx
je 0x409471
mov eax, dword [0x4feb00]
mov dword [edi + 0x427c], 0
mov dword [edi + 0x4278], 0
test eax, eax
je 0x409461
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4280], 0
xor esi, esi
cmp dword [edi + 0x41f0], esi
jle 0x4094bc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov eax, dword [edi + 0x41f8]
mov edx, dword [eax + ecx + 0x18]
test edx, edx
je 0x4094a6
mov eax, dword [0x4feb00]
test eax, eax
je 0x40949d
dec dword [eax + 0xb0]
push edx
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
mov dword [ebp - 4], 0xffffffff
inc esi
add ecx, 0x1c
mov dword [ebp - 0x10], ecx
cmp esi, dword [edi + 0x41f0]
jl 0x409480
mov ecx, dword [edi + 0x41f8]
test ecx, ecx
je 0x4094f9
mov eax, dword [0x4feb00]
mov dword [edi + 0x41f4], 0
mov dword [edi + 0x41f0], 0
test eax, eax
je 0x4094e9
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x41f8], 0
lea ecx, [edi + 0x4210]
call fcn.00417840
cmp dword [edi + 0x4204], 0
mov dword [ebp - 0x10], 0
jle 0x409572
xor ecx, ecx
mov dword [ebp - 0x14], ecx
nop dword [eax]
mov esi, dword [edi + 0x420c]
add esi, ecx
lea ecx, [esi + 0x10]
mov dword [ebp - 4], 3
call fcn.00423190
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x409553
mov eax, dword [0x4feb00]
test eax, eax
je 0x40954d
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
add ecx, 0x68
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
cmp eax, dword [edi + 0x4204]
jl 0x409520
mov ecx, dword [edi + 0x420c]
test ecx, ecx
je 0x4095af
mov eax, dword [0x4feb00]
mov dword [edi + 0x4208], 0
mov dword [edi + 0x4204], 0
test eax, eax
je 0x40959f
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x420c], 0
mov ecx, dword [edi + 0x4244]
test ecx, ecx
je 0x4095ec
mov eax, dword [0x4feb00]
mov dword [edi + 0x4240], 0
mov dword [edi + 0x423c], 0
test eax, eax
je 0x4095dc
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4244], 0
mov ecx, dword [edi + 0x51e4]
test ecx, ecx
je 0x409629
mov eax, dword [0x4feb00]
mov dword [edi + 0x51e0], 0
mov dword [edi + 0x51dc], 0
test eax, eax
je 0x409619
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x51e4], 0
mov ecx, dword [edi + 0x51f0]
test ecx, ecx
je 0x409666
mov eax, dword [0x4feb00]
mov dword [edi + 0x51ec], 0
mov dword [edi + 0x51e8], 0
test eax, eax
je 0x409656
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x51f0], 0
mov ecx, dword [edi + 0x42b0]
test ecx, ecx
je 0x4096a3
mov eax, dword [0x4feb00]
mov dword [edi + 0x42ac], 0
mov dword [edi + 0x42a8], 0
test eax, eax
je 0x409693
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x42b0], 0
mov ecx, dword [edi + 0x42bc]
test ecx, ecx
je 0x4096e0
mov eax, dword [0x4feb00]
mov dword [edi + 0x42b8], 0
mov dword [edi + 0x42b4], 0
test eax, eax
je 0x4096d0
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x42bc], 0
mov ecx, dword [edi + 0x42c8]
test ecx, ecx
je 0x40971d
mov eax, dword [0x4feb00]
mov dword [edi + 0x42c4], 0
mov dword [edi + 0x42c0], 0
test eax, eax
je 0x40970d
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x42c8], 0
mov ecx, dword [edi + 0x523c]
test ecx, ecx
je 0x40975a
mov eax, dword [0x4feb00]
mov dword [edi + 0x5238], 0
mov dword [edi + 0x5234], 0
test eax, eax
je 0x40974a
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x523c], 0
mov ecx, dword [edi + 0x5230]
test ecx, ecx
je 0x409797
mov eax, dword [0x4feb00]
mov dword [edi + 0x522c], 0
mov dword [edi + 0x5228], 0
test eax, eax
je 0x409787
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5230], 0
cmp dword [edi + 0x5264], 0
je 0x4097c9
mov esi, dword [edi + 0x5264]
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 0x4097bf
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x5264], 0
mov ecx, dword [edi + 0x5270]
test ecx, ecx
je 0x409806
mov eax, dword [0x4feb00]
mov dword [edi + 0x526c], 0
mov dword [edi + 0x5268], 0
test eax, eax
je 0x4097f6
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5270], 0
mov ecx, dword [edi + 0x529c]
test ecx, ecx
je 0x409843
mov eax, dword [0x4feb00]
mov dword [edi + 0x5298], 0
mov dword [edi + 0x5294], 0
test eax, eax
je 0x409833
dec dword [eax + 0xb0]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x529c], 0
mov byte [edi], 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