Function at 0x486281
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 [0x630160]
xor eax, ebp
mov dword [ebp + 0x2b4], eax
push 0x60
mov eax, 0x5c4007
call fcn.0041d26d
mov edi, dword [ebp + 0x2c8]
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x28], edi
cmp edi, ebx
jne 0x486456
call fcn.0046bdb6
push eax
lea ecx, [ebp + 0x230]
call fcn.00473641
mov dword [ebp - 4], ebx
call fcn.0046bdbc
mov ecx, eax
call fcn.0047334a
test al, al
je 0x486376
push dword [ebp + 0x2c0]
lea ecx, [ebp + 0x230]
call fcn.004733da
push ebx
push 0x80
push 3
push ebx
push 1
push accept
lea ecx, [ebp + 0x230]
call fcn.004730dd
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x486331
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x230]
call fcn.00473225
jmp 0x486679
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x48631d
push esi
mov dword [ebp - 0x38], ebx
call fcn.0041884e
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 0x486442
push edi
call fcn.0041960a
pop ecx
jmp 0x48631d
call fcn.0046bdbc
push eax
lea ecx, [ebp + 0x230]
call fcn.004733c0
call fcn.0046bdc2
test al, al
je 0x486397
call fcn.0046bdc8
jmp 0x4863ae
push 2
push ebx
lea ecx, [ebp + 0x230]
call fcn.004730dd
push eax
call fcn.00489ff7
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x48631d
lea eax, [ebp]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push dword [ebp + 0x2c0]
push dword [ebp - 0x14]
call fcn.004886f5
add esp, 0x14
test eax, eax
jne 0x48631d
mov esi, dword [ebp + 0x22c]
cmp esi, ebx
je 0x48631d
push esi
call fcn.0041884e
push 3
push esi
mov edi, eax
push edi
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.0048a054
add esp, 0x18
cmp eax, ebx
je 0x486430
cmp eax, 0x600
je 0x486430
push edi
call fcn.0041960a
pop ecx
call fcn.0046bdc2
test al, al
jne 0x48631d
push dword [ebp - 0x14]
call fcn.0048a08e
jmp 0x486373
call fcn.0046bdc2
test al, al
jne 0x486442
push dword [ebp - 0x14]
call fcn.0048a08e
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x230]
call fcn.00473225
jmp 0x486671
push str.COLOR
push edi
call fcn.004f23b4
pop ecx
pop ecx
test eax, eax
jne 0x486600
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 0x486492
push str.COLOR
push dword [ebp - 0x28]
call fcn.004f23b4
pop ecx
pop ecx
test eax, eax
je 0x4864bc
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.004a26dc
push edi
mov dword [ebp - 0x14], eax
call fcn.0041960a
add esp, 0x1c
cmp dword [ebp - 0x14], ebx
je 0x4866e6
push 0x2c
lea eax, [ebp - 0x6c]
push ebx
push eax
call fcn.00422f70
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 0x4866e6
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 0x486582
push str.COLOR
push dword [ebp - 0x28]
call fcn.004f23b4
pop ecx
pop ecx
test eax, eax
jne 0x486582
mov eax, dword [ebp + 0x2c0]
mov dword [ebp - 0x3c], ebx
cmp word [eax], 0x23
jne 0x486558
push eax
call dword [sym.imp.USER32.dll_CharNextW]
push 0x10
lea ecx, [ebp - 0x3c]
push ecx
push eax
call fcn.0041bd70
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 0x486746
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 0x4866ed
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 0x4866ff
push edi
push dword [ebp + 0x2c0]
call fcn.0046bda7
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, ebx
je 0x486679
push esi
call fcn.0046bda7
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x2c], eax
push esi
cmp eax, ebx
jne 0x486639
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x486679
call fcn.0046bda7
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x486679
push esi
call fcn.0041884e
pop ecx
push esi
push dword [ebp - 0x2c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.00422ff0
add esp, 0xc
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp edi, ebx
jne 0x48646e
push ebx
push 0x80
push 3
push ebx
push 1
push accept
push dword [ebp + 0x2c0]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
je 0x4866e6
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x4866e6
push esi
mov dword [ebp - 0x20], ebx
call fcn.0041884e
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 0x4866de
push edi
call fcn.0041960a
pop ecx
xor edi, edi
cmp edi, ebx
jne 0x48646e
xor eax, eax
jmp 0x4867b3
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 0x486730
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 0x48659a
cmp dword [ebp - 0x28], ebx
je 0x48675e
push str.COLOR
push dword [ebp - 0x28]
call fcn.004f23b4
pop ecx
pop ecx
test eax, eax
je 0x486767
push dword [ebp - 0x14]
call fcn.00499818
pop ecx
push 0xa0
call fcn.00419c40
mov esi, eax
pop ecx
mov dword [ebp - 0x3c], esi
mov dword [ebp - 4], 1
cmp esi, ebx
je 0x48678e
lea ecx, [esi + 0x18]
call fcn.00473200
mov eax, esi
jmp 0x486790
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.00418878
add ebp, 0x2b8
leave
ret