Function at 0x405726
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x41fb35
call fcn.0041f4e0
sub esp, 0x78c
mov ecx, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
cmp ecx, ebx
je 0x405753
call fcn.00401cff
push eax
call fcn.004025a3
mov esi, eax
pop ecx
cmp esi, ebx
jne 0x40575a
xor eax, eax
jmp 0x405974
push edi
push 0x20
call sub.MFC42.DLL_operatornew
pop ecx
mov ecx, eax
mov dword [ebp + 0xc], ecx
cmp ecx, ebx
mov dword [ebp - 4], ebx
je 0x40577b
call fcn.0040173c
mov edi, eax
mov dword [ebp + 0xc], edi
jmp 0x405780
mov dword [ebp + 0xc], ebx
mov edi, ebx
or dword [ebp - 4], 0xffffffff
push esi
mov ecx, edi
call fcn.0040183c
mov ecx, edi
call fcn.00401c57
mov ecx, edi
mov esi, eax
call fcn.00401c83
mov ecx, edi
mov dword [ebp - 0x14], eax
call fcn.00401c2e
cmp ax, 8
je 0x4057b5
push 8
mov ecx, edi
call fcn.00401d7d
push 0x80
lea eax, [ebp - 0x98]
push ebx
push eax
call sub.MSVCRT.dll_memset
or byte [ebp - 0x85], 0xff
or byte [ebp - 0x84], 0xff
or byte [ebp - 0x83], 0xff
lea eax, [esi - 1]
mov word [ebp - 0x90], ax
mov eax, dword [ebp - 0x14]
add esp, 0xc
dec eax
mov ecx, edi
mov byte [ebp - 0x98], 0xa
mov byte [ebp - 0x97], 5
mov byte [ebp - 0x96], 1
mov byte [ebp - 0x95], 8
mov word [ebp - 0x94], bx
mov word [ebp - 0x92], bx
mov word [ebp - 0x8e], ax
mov byte [ebp - 0x88], bl
mov byte [ebp - 0x87], bl
mov byte [ebp - 0x86], bl
mov byte [ebp - 0x58], bl
mov byte [ebp - 0x57], 1
mov word [ebp - 0x56], si
mov word [ebp - 0x54], 1
call fcn.00401c03
lea ecx, [ebp - 0x798]
mov esi, pe_nt_image_headers32
push ecx
push esi
push ebx
push dword [eax + 4]
call dword [sym.imp.GDI32.dll_GetPaletteEntries]
lea edi, [ebp - 0x397]
lea eax, [ebp - 0x797]
mov cl, byte [eax - 1]
mov byte [edi - 1], cl
mov cl, byte [eax]
mov byte [edi], cl
mov cl, byte [eax + 1]
mov byte [edi + 1], cl
add eax, 4
add edi, 3
dec esi
jne 0x40586b
mov esi, dword [ebp + 0xc]
mov ecx, esi
call fcn.00401cff
push eax
call fcn.004025a3
cmp esi, ebx
pop ecx
mov dword [ebp - 0x10], eax
je 0x4058a5
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 4]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
push esi
call fcn.00401ec8
push esi
mov dword [ebp - 0x18], eax
call fcn.00401f62
push 0x4256a0
mov esi, eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x10
cmp eax, ebx
mov dword [ebp + 0xc], eax
je 0x40595f
push eax
push 1
lea eax, [ebp - 0x98]
push 0x80
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [ebp - 0x14]
add esp, 0x10
lea edi, [eax - 1]
cmp edi, ebx
jl 0x40592e
movzx eax, si
mov esi, eax
imul eax, edi
neg esi
add eax, dword [ebp - 0x18]
mov dword [ebp + 8], eax
push dword [ebp + 0xc]
movzx eax, word [ebp - 0x56]
push dword [ebp + 8]
push eax
call fcn.00405369
add esp, 0xc
test eax, eax
je 0x405955
add dword [ebp + 8], esi
dec edi
cmp edi, ebx
jge 0x40590f
push dword [ebp + 0xc]
push 0xc
call dword [sym.imp.MSVCRT.dll_fputc]
push dword [ebp + 0xc]
lea eax, [ebp - 0x398]
push 0x300
push 1
pop ebx
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x18
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, ebx
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8