Function at 0x42f2f9
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push ebp
sub esp, 0x2b4
lea ebp, [esp - 4]
mov eax, dword [0x487fb0]
xor eax, ebp
mov dword [ebp + 0x2b4], eax
push 0x60
mov eax, 0x46caa5
call fcn.00451cdd
mov edi, dword [ebp + 0x2c8]
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x28], edi
cmp edi, ebx
jne 0x42f4ce
call fcn.00410b36
push eax
lea ecx, [ebp + 0x230]
call fcn.00418b13
mov dword [ebp - 4], ebx
call fcn.00410b3c
mov ecx, eax
call fcn.0041881c
test al, al
je 0x42f3ee
push dword [ebp + 0x2c0]
lea ecx, [ebp + 0x230]
call fcn.004188ac
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea ecx, [ebp + 0x230]
call fcn.004185bd
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x42f3a9
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x230]
call fcn.004186f7
jmp 0x42f6f1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x42f395
push esi
mov dword [ebp - 0x38], ebx
call fcn.0041005d
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x38]
push eax
push esi
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x38], esi
je 0x42f4ba
push edi
call fcn.0044f44a
pop ecx
jmp 0x42f395
call fcn.00410b3c
push eax
lea ecx, [ebp + 0x230]
call fcn.00418892
call fcn.00410b42
test al, al
je 0x42f40f
call fcn.00410b48
jmp 0x42f426
push 2
push ebx
lea ecx, [ebp + 0x230]
call fcn.004185bd
push eax
call fcn.0042a304
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x42f395
lea eax, [ebp]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push dword [ebp + 0x2c0]
push dword [ebp - 0x14]
call fcn.00428a02
add esp, 0x14
test eax, eax
jne 0x42f395
mov esi, dword [ebp + 0x22c]
cmp esi, ebx
je 0x42f395
push esi
call fcn.0041005d
push 3
push esi
mov edi, eax
push edi
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0042a361
add esp, 0x18
cmp eax, ebx
je 0x42f4a8
cmp eax, 0x600
je 0x42f4a8
push edi
call fcn.0044f44a
pop ecx
call fcn.00410b42
test al, al
jne 0x42f395
push dword [ebp - 0x14]
call fcn.0042a39b
jmp 0x42f3eb
call fcn.00410b42
test al, al
jne 0x42f4ba
push dword [ebp - 0x14]
call fcn.0042a39b
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x230]
call fcn.004186f7
jmp 0x42f6e9
push str.COLOR
push edi
call fcn.00452808
pop ecx
pop ecx
test eax, eax
jne 0x42f678
xor edi, edi
inc edi
xor eax, eax
inc eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x28], ebx
je 0x42f50a
push str.COLOR
push dword [ebp - 0x28]
call fcn.00452808
pop ecx
pop ecx
test eax, eax
je 0x42f534
push 4
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
push esi
push edi
call fcn.00447e7f
push edi
mov dword [ebp - 0x14], eax
call fcn.0044f44a
add esp, 0x1c
cmp dword [ebp - 0x14], ebx
je 0x42f75e
push 0x2c
lea eax, [ebp - 0x6c]
push ebx
push eax
call fcn.00451da0
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
mov edx, eax
imul eax, ecx
add esp, 0xc
neg edx
mov dword [ebp - 0x64], edx
push 0x20
xor edx, edx
inc edx
mov word [ebp - 0x60], dx
pop edx
push ebx
shl eax, 2
push ebx
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x18]
push eax
push ebx
lea eax, [ebp - 0x6c]
push eax
push ebx
mov dword [ebp - 0x6c], 0x28
mov dword [ebp - 0x68], ecx
mov word [ebp - 0x5e], dx
mov dword [ebp - 0x5c], ebx
mov byte [ebp - 0xd], bl
mov dword [ebp - 0x18], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x38], eax
cmp eax, ebx
je 0x42f75e
xor eax, eax
mov byte [ebp - 0x24], bl
lea edi, [ebp - 0x23]
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [ebp - 0x28], ebx
je 0x42f5fa
push str.COLOR
push dword [ebp - 0x28]
call fcn.00452808
pop ecx
pop ecx
test eax, eax
jne 0x42f5fa
mov eax, dword [ebp + 0x2c0]
mov dword [ebp - 0x3c], ebx
cmp word [eax], 0x23
jne 0x42f5d0
push eax
call dword [sym.imp.USER32.dll_CharNextW]
push 0x10
lea ecx, [ebp - 0x3c]
push ecx
push eax
call fcn.0045269a
mov dword [ebp - 0x20], eax
mov cl, byte [ebp - 0x1d]
mov byte [ebp - 0x22], al
mov al, byte [ebp - 0x1e]
mov byte [ebp - 0x23], ah
mov byte [ebp - 0x24], al
lea eax, [ebp - 0x24]
add esp, 0xc
mov byte [ebp - 0x21], cl
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x34]
imul eax, dword [ebp - 0x30]
mov dword [ebp - 0x1c], ebx
test eax, eax
jle 0x42f7be
mov esi, dword [ebp - 0x14]
add esi, 3
mov ecx, dword [ebp - 0x1c]
mov al, byte [esi]
mov edx, dword [ebp - 0x18]
shl ecx, 2
mov byte [ecx + edx + 3], al
mov eax, dword [ebp - 0x18]
lea edi, [ecx + eax]
cmp byte [edi + 3], 0xff
mov dword [ebp - 0x2c], edi
jae 0x42f765
movzx edx, byte [esi]
movzx eax, byte [esi - 1]
imul eax, edx
xor edx, edx
mov edi, 0xff
div edi
mov edx, dword [ebp - 0x2c]
mov byte [ebp - 0xd], 1
mov byte [edx], al
movzx edx, byte [esi]
movzx eax, byte [esi - 2]
imul eax, edx
xor edx, edx
div edi
mov edx, dword [ebp - 0x18]
mov byte [ecx + edx + 1], al
movzx edx, byte [esi]
movzx eax, byte [esi - 3]
imul eax, edx
xor edx, edx
div edi
jmp 0x42f777
push edi
push dword [ebp + 0x2c0]
call fcn.00410b27
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, ebx
je 0x42f6f1
push esi
call fcn.00410b27
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x2c], eax
push esi
cmp eax, ebx
jne 0x42f6b1
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x42f6f1
call fcn.00410b27
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x42f6f1
push esi
call fcn.0041005d
pop ecx
push esi
push dword [ebp - 0x2c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.00452110
add esp, 0xc
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp edi, ebx
jne 0x42f4e6
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 0x2c0]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
je 0x42f75e
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x42f75e
push esi
mov dword [ebp - 0x20], ebx
call fcn.0041005d
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x20]
push eax
push esi
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], esi
je 0x42f756
push edi
call fcn.0044f44a
pop ecx
xor edi, edi
cmp edi, ebx
jne 0x42f4e6
xor eax, eax
jmp 0x42f82b
mov al, byte [esi - 1]
mov byte [edi], al
mov al, byte [esi - 2]
mov edx, dword [ebp - 0x18]
mov byte [ecx + edx + 1], al
mov al, byte [esi - 3]
mov edx, dword [ebp - 0x18]
mov byte [ecx + edx + 2], al
mov eax, dword [ebp - 0x18]
add eax, ecx
mov edx, dword [eax]
cmp edx, dword [ebp + 0x2cc]
jne 0x42f7a8
mov byte [eax], bl
mov eax, dword [ebp - 0x18]
mov byte [ecx + eax + 1], bl
mov eax, dword [ebp - 0x18]
mov byte [ecx + eax + 2], bl
mov eax, dword [ebp - 0x18]
mov byte [ecx + eax + 3], bl
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0x34]
imul eax, dword [ebp - 0x30]
inc dword [ebp - 0x1c]
add esi, 4
cmp dword [ebp - 0x1c], eax
jl 0x42f612
cmp dword [ebp - 0x28], ebx
je 0x42f7d6
push str.COLOR
push dword [ebp - 0x28]
call fcn.00452808
pop ecx
pop ecx
test eax, eax
je 0x42f7df
push dword [ebp - 0x14]
call fcn.0043efbb
pop ecx
push 0xa0
call fcn.0044f3da
mov esi, eax
pop ecx
mov dword [ebp - 0x3c], esi
mov dword [ebp - 4], 1
cmp esi, ebx
je 0x42f806
lea ecx, [esi + 0x18]
call fcn.004186d2
mov eax, esi
jmp 0x42f808
xor eax, eax
mov ecx, dword [ebp - 0x38]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x18]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x30]
mov dword [eax + 0xc], ecx
mov ecx, dword [ebp - 0x34]
mov dword [eax + 0x10], ecx
mov cl, byte [ebp - 0xd]
mov byte [eax + 0x14], cl
mov byte [eax + 0x15], bl
mov dword [eax + 8], ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2b4]
xor ecx, ebp
call fcn.0044f3b0
add ebp, 0x2b8
leave
ret