Function at 0x40c810
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431270
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x43a040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x98]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test eax, eax
je 0x40c87a
cmp byte [edi + 1], 0
je 0x40c87a
mov byte [eax + 0x10], 0
mov esi, dword [edi + 0x98]
test esi, esi
je 0x40c87a
mov ecx, esi
call fcn.00424eb0
mov eax, dword [0x43a858]
test eax, eax
je 0x40c874
dec dword [eax + 0x36c]
push esi
call ebx
add esp, 4
cmp byte [edi], 0
mov dword [edi + 0x98], 0
je 0x40d169
cmp byte [edi + 0x2f59], 0
je 0x40c901
mov esi, dword [edi + 0x20]
test esi, esi
je 0x40c901
mov eax, dword [0x43a858]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov dword [0x43a858], edi
mov dword [edi + 0x2f5c], 0
mov dword [ebp - 0x10], 0
call fcn.004189f0
mov edx, 0x4328bc
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.00408560
mov esi, eax
test esi, esi
je 0x40c8f9
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 [0x43a858], eax
xor esi, esi
cmp dword [edi + 0x2f90], esi
jle 0x40c93a
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov edx, dword [edi + 0x2f98]
add edx, ecx
cmp dword [edx + 4], 6
jne 0x40c92b
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 + 0x2f90]
jl 0x40c910
xor edx, edx
lea esi, [edi + 0x1b68]
mov dword [ebp - 0x10], edx
cmp dword [edi + 0x1b60], edx
jle 0x40c99b
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov eax, dword [esi]
mov esi, dword [ecx + eax]
test esi, esi
je 0x40c97d
mov ecx, esi
call fcn.00409a90
mov eax, dword [0x43a858]
test eax, eax
je 0x40c971
dec dword [eax + 0x36c]
push esi
call ebx
mov ecx, dword [ebp - 0x14]
add esp, 4
mov edx, dword [ebp - 0x10]
inc edx
lea esi, [edi + 0x1b68]
add ecx, 4
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], ecx
cmp edx, dword [edi + 0x1b60]
jl 0x40c952
lea esi, [edi + 0x1b68]
mov ecx, dword [esi]
test ecx, ecx
je 0x40c9d0
mov eax, dword [0x43a858]
mov dword [edi + 0x1b64], 0
mov dword [edi + 0x1b60], 0
test eax, eax
je 0x40c9c4
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [esi], 0
mov ecx, dword [edi + 0x1b74]
test ecx, ecx
je 0x40ca0d
mov eax, dword [0x43a858]
mov dword [edi + 0x1b70], 0
mov dword [edi + 0x1b6c], 0
test eax, eax
je 0x40c9fd
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b74], 0
mov ecx, dword [edi + 0x1b80]
test ecx, ecx
je 0x40ca4a
mov eax, dword [0x43a858]
mov dword [edi + 0x1b7c], 0
mov dword [edi + 0x1b78], 0
test eax, eax
je 0x40ca3a
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b80], 0
mov dword [edi + 0x1ba8], 0
mov ecx, dword [edi + 0x1b8c]
test ecx, ecx
je 0x40ca91
mov eax, dword [0x43a858]
mov dword [edi + 0x1b88], 0
mov dword [edi + 0x1b84], 0
test eax, eax
je 0x40ca81
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b8c], 0
mov ecx, dword [edi + 0x1b98]
test ecx, ecx
je 0x40cace
mov eax, dword [0x43a858]
mov dword [edi + 0x1b94], 0
mov dword [edi + 0x1b90], 0
test eax, eax
je 0x40cabe
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1b98], 0
mov dword [edi + 0x1d50], 0
mov dword [edi + 0x1bb0], 0
mov dword [edi + 0x1bac], 0
mov dword [edi + 0x1c24], 0
mov dword [edi + 0x1c10], 0
mov dword [edi + 0x1bb4], 0
mov ecx, dword [edi + 0x1cec]
test ecx, ecx
je 0x40cb47
mov eax, dword [0x43a858]
mov dword [edi + 0x1ce8], 0
mov dword [edi + 0x1ce4], 0
test eax, eax
je 0x40cb37
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1cec], 0
mov ecx, dword [edi + 0x1cf8]
test ecx, ecx
je 0x40cb84
mov eax, dword [0x43a858]
mov dword [edi + 0x1cf4], 0
mov dword [edi + 0x1cf0], 0
test eax, eax
je 0x40cb74
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1cf8], 0
mov ecx, dword [edi + 0x1d04]
test ecx, ecx
je 0x40cbc1
mov eax, dword [0x43a858]
mov dword [edi + 0x1d00], 0
mov dword [edi + 0x1cfc], 0
test eax, eax
je 0x40cbb1
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1d04], 0
mov ecx, dword [edi + 0x1d34]
test ecx, ecx
je 0x40cbfe
mov eax, dword [0x43a858]
mov dword [edi + 0x1d30], 0
mov dword [edi + 0x1d2c], 0
test eax, eax
je 0x40cbee
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1d34], 0
mov ecx, dword [edi + 0x1d40]
test ecx, ecx
je 0x40cc3b
mov eax, dword [0x43a858]
mov dword [edi + 0x1d3c], 0
mov dword [edi + 0x1d38], 0
test eax, eax
je 0x40cc2b
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1d40], 0
xor edx, edx
mov dword [ebp - 0x14], edx
cmp dword [edi + 0x1d44], edx
jle 0x40cd07
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov eax, dword [edi + 0x1d4c]
mov esi, dword [ecx + eax]
test esi, esi
je 0x40ccf1
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40cc91
mov ecx, eax
call fcn.00406930
mov eax, dword [0x43a858]
test eax, eax
je 0x40cc89
dec dword [eax + 0x36c]
push dword [ebp - 0x18]
call ebx
add esp, 4
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40ccb9
mov ecx, eax
call fcn.00406930
mov eax, dword [0x43a858]
test eax, eax
je 0x40ccb1
dec dword [eax + 0x36c]
push dword [ebp - 0x18]
call ebx
add esp, 4
push 0x4193f0
push 2
push 0xc
lea eax, [esi + 0x60]
mov byte [ebp - 4], 1
push eax
call fcn.0042f564
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x43a858]
test eax, eax
je 0x40cce5
dec dword [eax + 0x36c]
push esi
call ebx
mov ecx, dword [ebp - 0x10]
add esp, 4
mov edx, dword [ebp - 0x14]
inc edx
add ecx, 4
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], ecx
cmp edx, dword [edi + 0x1d44]
jl 0x40cc51
mov ecx, dword [edi + 0x1d4c]
test ecx, ecx
je 0x40cd44
mov eax, dword [0x43a858]
mov dword [edi + 0x1d48], 0
mov dword [edi + 0x1d44], 0
test eax, eax
je 0x40cd34
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1d4c], 0
lea ecx, [edi + 0x1fb0]
call fcn.00419510
mov ecx, dword [edi + 0x1fd8]
test ecx, ecx
je 0x40cd8c
mov eax, dword [0x43a858]
mov dword [edi + 0x1fd4], 0
mov dword [edi + 0x1fd0], 0
test eax, eax
je 0x40cd7c
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1fd8], 0
mov ecx, dword [edi + 0x1fe4]
test ecx, ecx
je 0x40cdc9
mov eax, dword [0x43a858]
mov dword [edi + 0x1fe0], 0
mov dword [edi + 0x1fdc], 0
test eax, eax
je 0x40cdb9
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1fe4], 0
xor esi, esi
cmp dword [edi + 0x1f54], esi
jle 0x40ce1c
xor ecx, ecx
mov dword [ebp - 0x14], ecx
nop dword [eax + eax]
mov eax, dword [edi + 0x1f5c]
mov edx, dword [eax + ecx + 0x14]
test edx, edx
je 0x40ce06
mov eax, dword [0x43a858]
test eax, eax
je 0x40cdfd
dec dword [eax + 0x36c]
push edx
call ebx
mov ecx, dword [ebp - 0x14]
add esp, 4
inc esi
mov dword [ebp - 4], 0xffffffff
add ecx, 0x18
mov dword [ebp - 0x14], ecx
cmp esi, dword [edi + 0x1f54]
jl 0x40cde0
mov ecx, dword [edi + 0x1f5c]
test ecx, ecx
je 0x40ce59
mov eax, dword [0x43a858]
mov dword [edi + 0x1f58], 0
mov dword [edi + 0x1f54], 0
test eax, eax
je 0x40ce49
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1f5c], 0
lea ecx, [edi + 0x1f74]
call fcn.004196e0
cmp dword [edi + 0x1f68], 0
mov dword [ebp - 0x14], 0
jle 0x40ced2
xor ecx, ecx
mov dword [ebp - 0x10], ecx
nop dword [eax]
mov esi, dword [edi + 0x1f70]
add esi, ecx
lea ecx, [esi + 0x10]
mov dword [ebp - 4], 3
call fcn.004247f0
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x40ceb3
mov eax, dword [0x43a858]
test eax, eax
je 0x40cead
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
inc eax
mov ecx, dword [ebp - 0x10]
add ecx, 0x68
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
cmp eax, dword [edi + 0x1f68]
jl 0x40ce80
mov ecx, dword [edi + 0x1f70]
test ecx, ecx
je 0x40cf0f
mov eax, dword [0x43a858]
mov dword [edi + 0x1f6c], 0
mov dword [edi + 0x1f68], 0
test eax, eax
je 0x40ceff
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1f70], 0
mov ecx, dword [edi + 0x1fa8]
test ecx, ecx
je 0x40cf4c
mov eax, dword [0x43a858]
mov dword [edi + 0x1fa4], 0
mov dword [edi + 0x1fa0], 0
test eax, eax
je 0x40cf3c
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x1fa8], 0
mov ecx, dword [edi + 0x2f38]
test ecx, ecx
je 0x40cf89
mov eax, dword [0x43a858]
mov dword [edi + 0x2f34], 0
mov dword [edi + 0x2f30], 0
test eax, eax
je 0x40cf79
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2f38], 0
mov ecx, dword [edi + 0x2f44]
test ecx, ecx
je 0x40cfc6
mov eax, dword [0x43a858]
mov dword [edi + 0x2f40], 0
mov dword [edi + 0x2f3c], 0
test eax, eax
je 0x40cfb6
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2f44], 0
mov ecx, dword [edi + 0x2004]
test ecx, ecx
je 0x40d003
mov eax, dword [0x43a858]
mov dword [edi + 0x2000], 0
mov dword [edi + 0x1ffc], 0
test eax, eax
je 0x40cff3
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2004], 0
mov ecx, dword [edi + 0x2010]
test ecx, ecx
je 0x40d040
mov eax, dword [0x43a858]
mov dword [edi + 0x200c], 0
mov dword [edi + 0x2008], 0
test eax, eax
je 0x40d030
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2010], 0
mov ecx, dword [edi + 0x201c]
test ecx, ecx
je 0x40d07d
mov eax, dword [0x43a858]
mov dword [edi + 0x2018], 0
mov dword [edi + 0x2014], 0
test eax, eax
je 0x40d06d
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x201c], 0
mov ecx, dword [edi + 0x2f80]
test ecx, ecx
je 0x40d0ba
mov eax, dword [0x43a858]
mov dword [edi + 0x2f7c], 0
mov dword [edi + 0x2f78], 0
test eax, eax
je 0x40d0aa
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2f80], 0
mov ecx, dword [edi + 0x2f74]
test ecx, ecx
je 0x40d0f7
mov eax, dword [0x43a858]
mov dword [edi + 0x2f70], 0
mov dword [edi + 0x2f6c], 0
test eax, eax
je 0x40d0e7
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2f74], 0
cmp dword [edi + 0x2fa8], 0
je 0x40d129
mov esi, dword [edi + 0x2fa8]
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 0x40d11f
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x2fa8], 0
mov ecx, dword [edi + 0x2fb4]
test ecx, ecx
je 0x40d166
mov eax, dword [0x43a858]
mov dword [edi + 0x2fb0], 0
mov dword [edi + 0x2fac], 0
test eax, eax
je 0x40d156
dec dword [eax + 0x36c]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x2fb4], 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