Function at 0x40c240
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4142db
push eax
mov eax, 0x240c
mov dword fs:[0], esp
call fcn.00413060
push ebx
push ebp
push esi
push edi
push 0x1000
lea ecx, [esp + 0x20]
call fcn.0040dbb0
mov ecx, dword [esp + 0x2430]
mov edx, dword [esp + 0x242c]
lea eax, [esp + 0x1c]
mov dword [esp + 0x2424], 0
push eax
push 0xc
push ecx
push edx
or ebp, 0xffffffff
call fcn.0040bed0
add esp, 0x10
test eax, eax
je 0x40c2c8
mov eax, dword [esp + 0x2454]
test eax, eax
je 0x40c2bc
push 0
push ebp
push 0x4e20
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov dword [esp + 0x2424], ebp
jmp 0x40c4c1
mov esi, dword [esp + 0x2454]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
test esi, esi
je 0x40c2e5
push 0
push 0
push 0x4e20
push esi
call ebx
mov eax, dword [esp + 0x2434]
push 8
push eax
lea ecx, [esp + 0x24]
call fcn.0040dc00
mov ecx, dword [esp + 0x2438]
lea edx, [esp + 0x18]
mov dword [esp + 0x18], ecx
push 4
push edx
lea ecx, [esp + 0x24]
call fcn.0040dc00
mov eax, dword [esp + 0x2444]
lea ecx, [esp + 0x1c]
push eax
call fcn.0040dd00
mov ecx, dword [esp + 0x2448]
push ecx
lea ecx, [esp + 0x20]
call fcn.0040dd00
mov dl, byte [esp + 0x244c]
lea eax, [esp + 0x12]
push 1
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x1a], dl
call fcn.0040dc00
mov edi, dword [esp + 0x2440]
lea ecx, [esp + 0x18]
push 4
push ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], edi
call fcn.0040dc00
mov edx, dword [esp + 0x243c]
push edi
push edx
lea ecx, [esp + 0x24]
call fcn.0040dc00
mov eax, dword [0x422210]
push 0
lea ecx, [esp + 0x20]
mov edi, dword [eax]
call fcn.0040dd40
push eax
lea ecx, [esp + 0x24]
call fcn.0040dd30
mov ecx, dword [0x422210]
push eax
push 7
call dword [edi + 0x18]
test eax, eax
jge 0x40c3e0
test esi, esi
je 0x40c3b9
push 0
push 0xffffffffffffffff
push 0x4e21
push esi
call ebx
mov ecx, dword [0x422210]
mov edx, dword [ecx]
call dword [edx + 0xc]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2424], 0xffffffff
call fcn.0040dbf0
or eax, 0xffffffff
jmp 0x40c4cc
test esi, esi
je 0x40c3f0
push 0
push 0
push 0x4e21
push esi
call ebx
mov ecx, dword [0x422210]
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x1034]
push edx
mov dword [esp + 0x1c], 0x13ec
mov eax, dword [ecx]
lea edx, [esp + 0x1b]
push edx
call dword [eax + 0x1c]
test eax, eax
jge 0x40c44d
test esi, esi
je 0x40c429
push 0
push 0xffffffffffffffff
push 0x4e22
push esi
call ebx
mov ecx, dword [0x422210]
mov eax, dword [ecx]
call dword [eax + 0xc]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2424], 0xffffffff
call fcn.0040dbf0
or eax, 0xffffffff
jmp 0x40c4cc
cmp byte [esp + 0x13], 7
jne 0x40c49c
mov eax, dword [esp + 0x14]
xor ebp, ebp
test eax, eax
jle 0x40c49c
mov ecx, dword [esp + 0x2450]
push 0x41fda8
push ecx
call sub.MSVCRT.dll_fopen
mov edi, eax
add esp, 8
test edi, edi
je 0x40c49c
mov edx, dword [esp + 0x14]
push edi
push edx
lea eax, [esp + 0x1038]
push 1
push eax
call sub.MSVCRT.dll_fwrite
push edi
call sub.MSVCRT.dll_fclose
add esp, 0x14
mov ebp, 1
test esi, esi
je 0x40c4ab
push 0
push ebp
push 0x4e22
push esi
call ebx
mov ecx, dword [0x422210]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov dword [esp + 0x2424], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.0040dbf0
mov eax, ebp
mov ecx, dword [esp + 0x241c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2418
ret