Function at 0x40c480
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x475ab0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x4902d4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [0x4931e0]
mov ebx, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [edi + 0x48]
test eax, eax
je 0x40c4e8
cmp byte [edi + 1], 0
je 0x40c4e8
mov byte [eax + 0x10], 0
mov esi, dword [edi + 0x48]
test esi, esi
je 0x40c4e8
mov ecx, esi
call fcn.0042b160
mov eax, dword [0x4931e0]
test eax, eax
je 0x40c4e2
dec dword [eax + 0xb4]
push esi
call ebx
add esp, 4
mov dword [edi + 0x48], 0
mov ecx, dword [edi + 0x3c0c]
test ecx, ecx
je 0x40c52c
mov eax, dword [0x4931e0]
mov dword [edi + 0x3c08], 0
mov dword [edi + 0x3c04], 0
test eax, eax
je 0x40c51c
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3c0c], 0
cmp byte [edi], 0
je 0x40ce94
cmp byte [edi + 0x5a11], 0
je 0x40c598
mov esi, dword [edi + 0x20]
test esi, esi
je 0x40c598
mov eax, dword [0x4931e0]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
mov dword [eax + 0x5a14], 0
call fcn.0041e430
mov edx, 0x47dbd0
mov dword [ebp - 0x14], eax
mov ecx, esi
call fcn.0040ae40
mov esi, eax
test esi, esi
je 0x40c598
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 + 0x5a48], esi
jle 0x40c5da
xor ecx, ecx
mov dword [ebp - 0x10], ecx
nop word [eax + eax]
mov edx, dword [edi + 0x5a50]
add edx, ecx
cmp dword [edx + 4], 6
jne 0x40c5cb
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 + 0x5a48]
jl 0x40c5b0
xor esi, esi
lea ecx, [edi + 0x3e00]
mov dword [ebp - 0x10], ecx
cmp dword [edi + 0x3df8], esi
jle 0x40c62b
nop dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40c620
mov ecx, eax
call fcn.0040d580
mov eax, dword [0x4931e0]
test eax, eax
je 0x40c612
dec dword [eax + 0xb4]
push dword [ebp - 0x14]
call ebx
add esp, 4
lea ecx, [edi + 0x3e00]
inc esi
cmp esi, dword [edi + 0x3df8]
jl 0x40c5f0
jmp 0x40c62e
mov dword [ebp - 0x10], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x40c666
mov eax, dword [0x4931e0]
mov dword [edi + 0x3dfc], 0
mov dword [edi + 0x3df8], 0
test eax, eax
je 0x40c657
dec dword [eax + 0xb4]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
mov ecx, dword [edi + 0x3e0c]
test ecx, ecx
je 0x40c6a3
mov eax, dword [0x4931e0]
mov dword [edi + 0x3e08], 0
mov dword [edi + 0x3e04], 0
test eax, eax
je 0x40c693
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e0c], 0
mov ecx, dword [edi + 0x3e18]
test ecx, ecx
je 0x40c6e0
mov eax, dword [0x4931e0]
mov dword [edi + 0x3e14], 0
mov dword [edi + 0x3e10], 0
test eax, eax
je 0x40c6d0
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e18], 0
mov dword [edi + 0x3e40], 0
mov ecx, dword [edi + 0x3e24]
test ecx, ecx
je 0x40c727
mov eax, dword [0x4931e0]
mov dword [edi + 0x3e20], 0
mov dword [edi + 0x3e1c], 0
test eax, eax
je 0x40c717
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e24], 0
mov ecx, dword [edi + 0x3e30]
test ecx, ecx
je 0x40c764
mov eax, dword [0x4931e0]
mov dword [edi + 0x3e2c], 0
mov dword [edi + 0x3e28], 0
test eax, eax
je 0x40c754
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x3e30], 0
lea ecx, [edi + 0x4558]
mov dword [edi + 0x47c0], 0
mov dword [edi + 0x3e48], 0
mov dword [edi + 0x3e44], 0
mov dword [edi + 0x3ebc], 0
mov dword [edi + 0x3ea8], 0
mov dword [edi + 0x3e4c], 0
call fcn.00408db0
mov ecx, dword [edi + 0x4758]
test ecx, ecx
je 0x40c7e8
mov eax, dword [0x4931e0]
mov dword [edi + 0x4754], 0
mov dword [edi + 0x4750], 0
test eax, eax
je 0x40c7d8
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4758], 0
mov ecx, dword [edi + 0x4764]
test ecx, ecx
je 0x40c825
mov eax, dword [0x4931e0]
mov dword [edi + 0x4760], 0
mov dword [edi + 0x475c], 0
test eax, eax
je 0x40c815
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4764], 0
mov ecx, dword [edi + 0x4770]
test ecx, ecx
je 0x40c862
mov eax, dword [0x4931e0]
mov dword [edi + 0x476c], 0
mov dword [edi + 0x4768], 0
test eax, eax
je 0x40c852
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4770], 0
mov ecx, dword [edi + 0x47a0]
test ecx, ecx
je 0x40c89f
mov eax, dword [0x4931e0]
mov dword [edi + 0x479c], 0
mov dword [edi + 0x4798], 0
test eax, eax
je 0x40c88f
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x47a0], 0
mov ecx, dword [edi + 0x47ac]
test ecx, ecx
je 0x40c8dc
mov eax, dword [0x4931e0]
mov dword [edi + 0x47a8], 0
mov dword [edi + 0x47a4], 0
test eax, eax
je 0x40c8cc
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x47ac], 0
xor ecx, ecx
lea edx, [edi + 0x47bc]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], edx
cmp dword [edi + 0x47b4], ecx
jle 0x40c9a7
mov eax, dword [edx]
mov esi, dword [eax + ecx*4]
test esi, esi
je 0x40c995
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40c932
mov ecx, eax
call fcn.00408b50
mov eax, dword [0x4931e0]
test eax, eax
je 0x40c92a
dec dword [eax + 0xb4]
push dword [ebp - 0x1c]
call ebx
add esp, 4
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x40c95a
mov ecx, eax
call fcn.00408b50
mov eax, dword [0x4931e0]
test eax, eax
je 0x40c952
dec dword [eax + 0xb4]
push dword [ebp - 0x1c]
call ebx
add esp, 4
push 0x41f2e0
push 2
push 0xc
lea eax, [esi + 0x64]
mov byte [ebp - 4], 1
push eax
call fcn.00474107
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x4931e0]
test eax, eax
je 0x40c986
dec dword [eax + 0xb4]
push esi
call ebx
mov ecx, dword [ebp - 0x10]
lea edx, [edi + 0x47bc]
add esp, 4
inc ecx
mov dword [ebp - 0x10], ecx
cmp ecx, dword [edi + 0x47b4]
jl 0x40c8f6
jmp 0x40c9aa
mov dword [ebp - 0x14], edx
mov ecx, dword [edx]
test ecx, ecx
je 0x40c9e2
mov eax, dword [0x4931e0]
mov dword [edi + 0x47b8], 0
mov dword [edi + 0x47b4], 0
test eax, eax
je 0x40c9d3
dec dword [eax + 0xb4]
push ecx
call ebx
mov eax, dword [ebp - 0x14]
add esp, 4
mov dword [eax], 0
lea ecx, [edi + 0x4a34]
call fcn.0041f340
mov ecx, dword [edi + 0x4a5c]
test ecx, ecx
je 0x40ca2a
mov eax, dword [0x4931e0]
mov dword [edi + 0x4a58], 0
mov dword [edi + 0x4a54], 0
test eax, eax
je 0x40ca1a
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4a5c], 0
mov ecx, dword [edi + 0x4a68]
test ecx, ecx
je 0x40ca67
mov eax, dword [0x4931e0]
mov dword [edi + 0x4a64], 0
mov dword [edi + 0x4a60], 0
test eax, eax
je 0x40ca57
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4a68], 0
xor esi, esi
lea eax, [edi + 0x49e0]
mov dword [ebp - 0x10], eax
cmp dword [edi + 0x49d8], esi
jle 0x40cac6
xor ecx, ecx
mov dword [ebp - 0x14], ecx
nop
mov eax, dword [eax]
mov edx, dword [eax + ecx + 0x18]
test edx, edx
je 0x40caa2
mov eax, dword [0x4931e0]
test eax, eax
je 0x40ca99
dec dword [eax + 0xb4]
push edx
call ebx
mov ecx, dword [ebp - 0x14]
add esp, 4
inc esi
mov dword [ebp - 4], 0xffffffff
add ecx, 0x1c
lea eax, [edi + 0x49e0]
mov dword [ebp - 0x14], ecx
cmp esi, dword [edi + 0x49d8]
jl 0x40ca80
lea eax, [edi + 0x49e0]
jmp 0x40cac9
mov dword [ebp - 0x10], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x40cb01
mov eax, dword [0x4931e0]
mov dword [edi + 0x49dc], 0
mov dword [edi + 0x49d8], 0
test eax, eax
je 0x40caf2
dec dword [eax + 0xb4]
push ecx
call ebx
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [eax], 0
lea ecx, [edi + 0x49f8]
call fcn.0041f4e0
cmp dword [edi + 0x49ec], 0
lea esi, [edi + 0x49f4]
mov dword [ebp - 0x14], 0
jle 0x40cb81
xor ecx, ecx
mov dword [ebp - 0x10], ecx
mov esi, dword [esi]
add esi, ecx
lea ecx, [esi + 0x10]
mov dword [ebp - 4], 3
call fcn.0042a970
mov ecx, dword [esi + 0x20]
test ecx, ecx
je 0x40cb56
mov eax, dword [0x4931e0]
test eax, eax
je 0x40cb50
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov eax, dword [ebp - 0x14]
lea esi, [edi + 0x49f4]
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 + 0x49ec]
jl 0x40cb27
lea esi, [edi + 0x49f4]
mov ecx, dword [esi]
test ecx, ecx
je 0x40cbb6
mov eax, dword [0x4931e0]
mov dword [edi + 0x49f0], 0
mov dword [edi + 0x49ec], 0
test eax, eax
je 0x40cbaa
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [esi], 0
mov ecx, dword [edi + 0x4a2c]
test ecx, ecx
je 0x40cbf3
mov eax, dword [0x4931e0]
mov dword [edi + 0x4a28], 0
mov dword [edi + 0x4a24], 0
test eax, eax
je 0x40cbe3
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4a2c], 0
mov ecx, dword [edi + 0x59e0]
test ecx, ecx
je 0x40cc30
mov eax, dword [0x4931e0]
mov dword [edi + 0x59dc], 0
mov dword [edi + 0x59d8], 0
test eax, eax
je 0x40cc20
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x59e0], 0
mov ecx, dword [edi + 0x59ec]
test ecx, ecx
je 0x40cc6d
mov eax, dword [0x4931e0]
mov dword [edi + 0x59e8], 0
mov dword [edi + 0x59e4], 0
test eax, eax
je 0x40cc5d
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x59ec], 0
mov ecx, dword [edi + 0x4a9c]
test ecx, ecx
je 0x40ccaa
mov eax, dword [0x4931e0]
mov dword [edi + 0x4a98], 0
mov dword [edi + 0x4a94], 0
test eax, eax
je 0x40cc9a
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4a9c], 0
mov ecx, dword [edi + 0x4aa8]
test ecx, ecx
je 0x40cce7
mov eax, dword [0x4931e0]
mov dword [edi + 0x4aa4], 0
mov dword [edi + 0x4aa0], 0
test eax, eax
je 0x40ccd7
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4aa8], 0
mov ecx, dword [edi + 0x4ab4]
test ecx, ecx
je 0x40cd24
mov eax, dword [0x4931e0]
mov dword [edi + 0x4ab0], 0
mov dword [edi + 0x4aac], 0
test eax, eax
je 0x40cd14
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x4ab4], 0
mov ecx, dword [edi + 0x5a38]
test ecx, ecx
je 0x40cd61
mov eax, dword [0x4931e0]
mov dword [edi + 0x5a34], 0
mov dword [edi + 0x5a30], 0
test eax, eax
je 0x40cd51
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5a38], 0
mov ecx, dword [edi + 0x5a2c]
test ecx, ecx
je 0x40cd9e
mov eax, dword [0x4931e0]
mov dword [edi + 0x5a28], 0
mov dword [edi + 0x5a24], 0
test eax, eax
je 0x40cd8e
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5a2c], 0
cmp dword [edi + 0x5a7c], 0
je 0x40cdd0
mov esi, dword [edi + 0x5a7c]
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 0x40cdc6
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [edi + 0x5a7c], 0
mov ecx, dword [edi + 0x5a88]
test ecx, ecx
je 0x40ce0d
mov eax, dword [0x4931e0]
mov dword [edi + 0x5a84], 0
mov dword [edi + 0x5a80], 0
test eax, eax
je 0x40cdfd
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5a88], 0
mov ecx, dword [edi + 0x5ab4]
test ecx, ecx
je 0x40ce4a
mov eax, dword [0x4931e0]
mov dword [edi + 0x5ab0], 0
mov dword [edi + 0x5aac], 0
test eax, eax
je 0x40ce3a
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5ab4], 0
mov ecx, dword [edi + 0x5ac0]
test ecx, ecx
je 0x40ce87
mov eax, dword [0x4931e0]
mov dword [edi + 0x5abc], 0
mov dword [edi + 0x5ab8], 0
test eax, eax
je 0x40ce77
dec dword [eax + 0xb4]
push ecx
call ebx
add esp, 4
mov dword [edi + 0x5ac0], 0
mov dword [edi + 0x5ac4], 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