Function at 0x40f4f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4885e0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4bf380]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x40]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test eax, eax
je 0x40f554
cmp byte [edi + 1], 0
je 0x40f554
mov byte [eax + 0x10], 0
mov esi, dword [edi + 0x40]
test esi, esi
je 0x40f554
mov ecx, esi
call fcn.0042abd0
mov eax, dword [0x56e3a0]
test eax, eax
je 0x40f54e
dec dword [eax + 0xa8]
push esi
call ebx
add esp, 4
cmp byte [edi], 0
mov dword [edi + 0x40], 0
je 0x40fe29
cmp byte [edi + 0x5175], 0
je 0x40f5d8
mov esi, dword [edi + 0x20]
test esi, esi
je 0x40f5d8
mov eax, dword [0x56e3a0]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov dword [0x56e3a0], edi
mov dword [edi + 0x5178], 0
mov dword [ebp - 0x10], 0
call fcn.0041d870
mov edx, 0x4906dc
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.0040ae00
mov esi, eax
test esi, esi
je 0x40f5d0
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 eax, dword [ebp - 0x18]
mov dword [0x56e3a0], eax
xor esi, esi
cmp dword [edi + 0x51ac], esi
jle 0x40f61a
xor ecx, ecx
mov dword [ebp - 0x10], ecx
nop word [eax + eax]
mov edx, dword [edi + 0x51b4]
add edx, ecx
cmp dword [edx + 4], 6
jne 0x40f60b
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 + 0x51ac]
jl 0x40f5f0
xor esi, esi
lea ecx, [edi + 0x3d68]
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3d60], esi
jle 0x40f66b
nop dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40f660
mov ecx, eax
call fcn.0040c7e0
mov eax, dword [0x56e3a0]
test eax, eax
je 0x40f652
dec dword [eax + 0xa8]
push dword [ebp - 0x18]
call ebx
add esp, 4
lea ecx, [edi + 0x3d68]
inc esi
cmp esi, dword [edi + 0x3d60]
jl 0x40f630
jmp 0x40f66e
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x40f6a6
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3d64], 0
mov dword [edi + 0x3d60], 0
test eax, eax
je 0x40f697
dec dword [eax + 0xa8]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
mov ecx, dword [edi + 0x3d74]
test ecx, ecx
je 0x40f6e3
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3d70], 0
mov dword [edi + 0x3d6c], 0
test eax, eax
je 0x40f6d3
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3d74], 0
mov ecx, dword [edi + 0x3d80]
test ecx, ecx
je 0x40f720
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3d7c], 0
mov dword [edi + 0x3d78], 0
test eax, eax
je 0x40f710
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3d80], 0
mov dword [edi + 0x3da8], 0
mov ecx, dword [edi + 0x3d8c]
test ecx, ecx
je 0x40f767
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3d88], 0
mov dword [edi + 0x3d84], 0
test eax, eax
je 0x40f757
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3d8c], 0
mov ecx, dword [edi + 0x3d98]
test ecx, ecx
je 0x40f7a4
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3d94], 0
mov dword [edi + 0x3d90], 0
test eax, eax
je 0x40f794
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3d98], 0
mov dword [edi + 0x3f5c], 0
mov dword [edi + 0x3db0], 0
mov dword [edi + 0x3dac], 0
mov dword [edi + 0x3e2c], 0
mov dword [edi + 0x3e18], 0
mov dword [edi + 0x3db4], 0
mov ecx, dword [edi + 0x3ef4]
test ecx, ecx
je 0x40f81d
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3ef0], 0
mov dword [edi + 0x3eec], 0
test eax, eax
je 0x40f80d
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3ef4], 0
mov ecx, dword [edi + 0x3f00]
test ecx, ecx
je 0x40f85a
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3efc], 0
mov dword [edi + 0x3ef8], 0
test eax, eax
je 0x40f84a
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f00], 0
mov ecx, dword [edi + 0x3f0c]
test ecx, ecx
je 0x40f897
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3f08], 0
mov dword [edi + 0x3f04], 0
test eax, eax
je 0x40f887
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f0c], 0
mov ecx, dword [edi + 0x3f3c]
test ecx, ecx
je 0x40f8d4
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3f38], 0
mov dword [edi + 0x3f34], 0
test eax, eax
je 0x40f8c4
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f3c], 0
mov ecx, dword [edi + 0x3f48]
test ecx, ecx
je 0x40f911
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3f44], 0
mov dword [edi + 0x3f40], 0
test eax, eax
je 0x40f901
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f48], 0
xor ecx, ecx
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3f50], ecx
jle 0x40f9cf
mov eax, dword [edi + 0x3f58]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x40f9bf
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40f962
mov ecx, eax
call fcn.00408ea0
mov eax, dword [0x56e3a0]
test eax, eax
je 0x40f95a
dec dword [eax + 0xa8]
push dword [ebp - 0x18]
call ebx
add esp, 4
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40f98a
mov ecx, eax
call fcn.00408ea0
mov eax, dword [0x56e3a0]
test eax, eax
je 0x40f982
dec dword [eax + 0xa8]
push dword [ebp - 0x18]
call ebx
add esp, 4
push 0x41e2c0
push 2
push 0xc
lea eax, [esi + 0x64]
mov byte [ebp - 4], 1
push eax
call fcn.0048606d
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x56e3a0]
test eax, eax
je 0x40f9b6
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 + 0x3f50]
jl 0x40f922
mov ecx, dword [edi + 0x3f58]
test ecx, ecx
je 0x40fa0c
mov eax, dword [0x56e3a0]
mov dword [edi + 0x3f54], 0
mov dword [edi + 0x3f50], 0
test eax, eax
je 0x40f9fc
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3f58], 0
lea ecx, [edi + 0x41bc]
call fcn.0041e3e0
mov ecx, dword [edi + 0x41e4]
test ecx, ecx
je 0x40fa54
mov eax, dword [0x56e3a0]
mov dword [edi + 0x41e0], 0
mov dword [edi + 0x41dc], 0
test eax, eax
je 0x40fa44
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x41e4], 0
mov ecx, dword [edi + 0x41f0]
test ecx, ecx
je 0x40fa91
mov eax, dword [0x56e3a0]
mov dword [edi + 0x41ec], 0
mov dword [edi + 0x41e8], 0
test eax, eax
je 0x40fa81
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x41f0], 0
xor esi, esi
cmp dword [edi + 0x4160], esi
jle 0x40fadc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov eax, dword [edi + 0x4168]
mov edx, dword [eax + ecx + 0x18]
test edx, edx
je 0x40fac6
mov eax, dword [0x56e3a0]
test eax, eax
je 0x40fabd
dec dword [eax + 0xa8]
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 + 0x4160]
jl 0x40faa0
mov ecx, dword [edi + 0x4168]
test ecx, ecx
je 0x40fb19
mov eax, dword [0x56e3a0]
mov dword [edi + 0x4164], 0
mov dword [edi + 0x4160], 0
test eax, eax
je 0x40fb09
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4168], 0
lea ecx, [edi + 0x4180]
call fcn.0041e590
cmp dword [edi + 0x4174], 0
mov dword [ebp - 0x10], 0
jle 0x40fb92
xor ecx, ecx
mov dword [ebp - 0x14], ecx
nop dword [eax]
mov esi, dword [edi + 0x417c]
add esi, ecx
lea ecx, [esi + 0x10]
mov dword [ebp - 4], 3
call fcn.0042a250
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x40fb73
mov eax, dword [0x56e3a0]
test eax, eax
je 0x40fb6d
dec dword [eax + 0xa8]
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 + 0x4174]
jl 0x40fb40
mov ecx, dword [edi + 0x417c]
test ecx, ecx
je 0x40fbcf
mov eax, dword [0x56e3a0]
mov dword [edi + 0x4178], 0
mov dword [edi + 0x4174], 0
test eax, eax
je 0x40fbbf
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x417c], 0
mov ecx, dword [edi + 0x41b4]
test ecx, ecx
je 0x40fc0c
mov eax, dword [0x56e3a0]
mov dword [edi + 0x41b0], 0
mov dword [edi + 0x41ac], 0
test eax, eax
je 0x40fbfc
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x41b4], 0
mov ecx, dword [edi + 0x5144]
test ecx, ecx
je 0x40fc49
mov eax, dword [0x56e3a0]
mov dword [edi + 0x5140], 0
mov dword [edi + 0x513c], 0
test eax, eax
je 0x40fc39
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5144], 0
mov ecx, dword [edi + 0x5150]
test ecx, ecx
je 0x40fc86
mov eax, dword [0x56e3a0]
mov dword [edi + 0x514c], 0
mov dword [edi + 0x5148], 0
test eax, eax
je 0x40fc76
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5150], 0
mov ecx, dword [edi + 0x4210]
test ecx, ecx
je 0x40fcc3
mov eax, dword [0x56e3a0]
mov dword [edi + 0x420c], 0
mov dword [edi + 0x4208], 0
test eax, eax
je 0x40fcb3
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4210], 0
mov ecx, dword [edi + 0x421c]
test ecx, ecx
je 0x40fd00
mov eax, dword [0x56e3a0]
mov dword [edi + 0x4218], 0
mov dword [edi + 0x4214], 0
test eax, eax
je 0x40fcf0
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x421c], 0
mov ecx, dword [edi + 0x4228]
test ecx, ecx
je 0x40fd3d
mov eax, dword [0x56e3a0]
mov dword [edi + 0x4224], 0
mov dword [edi + 0x4220], 0
test eax, eax
je 0x40fd2d
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4228], 0
mov ecx, dword [edi + 0x519c]
test ecx, ecx
je 0x40fd7a
mov eax, dword [0x56e3a0]
mov dword [edi + 0x5198], 0
mov dword [edi + 0x5194], 0
test eax, eax
je 0x40fd6a
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x519c], 0
mov ecx, dword [edi + 0x5190]
test ecx, ecx
je 0x40fdb7
mov eax, dword [0x56e3a0]
mov dword [edi + 0x518c], 0
mov dword [edi + 0x5188], 0
test eax, eax
je 0x40fda7
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5190], 0
cmp dword [edi + 0x51c4], 0
je 0x40fde9
mov esi, dword [edi + 0x51c4]
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 0x40fddf
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x51c4], 0
mov ecx, dword [edi + 0x51d0]
test ecx, ecx
je 0x40fe26
mov eax, dword [0x56e3a0]
mov dword [edi + 0x51cc], 0
mov dword [edi + 0x51c8], 0
test eax, eax
je 0x40fe16
dec dword [eax + 0xa8]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x51d0], 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