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

Disassembly:
push 0x250
mov eax, 0x661bf0
call fcn.0062fc7f
mov esi, ecx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x248], eax
call fcn.00487094
test ebx, ebx
jne 0x487332
call fcn.0046ffa2
push eax
lea ecx, [ebp - 0x244]
call fcn.0046b1fc
mov dword [ebp - 4], ebx
call fcn.0046ffa8
mov ecx, eax
call fcn.0046b951
test al, al
je 0x4871ae
mov ebx, dword [ebp - 0x248]
lea ecx, [ebp - 0x244]
push dword [ebx]
call fcn.0046b4df
push 0
push 0x80
push 3
push 0
push 1
push connect
lea ecx, [ebp - 0x244]
call fcn.00460070
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x48719a
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 4], eax
test eax, eax
je 0x48719a
and dword [ebp - 0x24c], 0
inc eax
push eax
call fcn.0062f5c7
pop ecx
mov ecx, dword [esi + 4]
mov dword [esi], eax
push 0
mov byte [eax + ecx], 0
lea eax, [ebp - 0x24c]
push eax
push dword [esi + 4]
push dword [esi]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x24c]
cmp eax, dword [esi + 4]
je 0x487241
mov ecx, esi
call fcn.00487094
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x244]
call fcn.0046b2ee
jmp 0x4873ac
call fcn.0046ffa8
push eax
lea ecx, [ebp - 0x244]
call fcn.0046b4c2
call fcn.00470279
test al, al
je 0x4871d1
call fcn.0046ffae
mov edi, eax
jmp 0x48723d
call fcn.0046ffb4
push eax
lea ecx, [ebp - 0x254]
call fcn.0046b1fc
lea ecx, [ebp - 0x25c]
mov byte [ebp - 4], 1
call fcn.0046b253
push 0xffffffffffffffff
lea ecx, [ebp - 0x254]
mov byte [ebp - 4], 2
call fcn.00460070
push eax
lea ecx, [ebp - 0x25c]
call fcn.0046bcc2
push eax
lea ecx, [ebp - 0x244]
call fcn.00460070
push eax
call fcn.004837e1
pop ecx
pop ecx
lea ecx, [ebp - 0x25c]
mov edi, eax
call fcn.0046b2ee
lea ecx, [ebp - 0x254]
mov byte [ebp - 4], bl
call fcn.0046b2ee
test edi, edi
jne 0x487255
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x244]
call fcn.0046b2ee
jmp 0x4873a6
mov dword [ebp - 0x250], ebx
lea ecx, [ebp - 0x24c]
mov ebx, dword [ebp - 0x248]
push 0xffffffffffffffff
push dword [ebx]
call fcn.0046b218
push 0x66f0c4
push 0x6674a0
lea ecx, [ebp - 0x24c]
mov byte [ebp - 4], 3
call fcn.0046baf9
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x250]
push eax
push 1
lea ecx, [ebp - 0x24c]
call fcn.00460070
push eax
push edi
call fcn.00483191
add esp, 0x14
test eax, eax
jne 0x487302
mov eax, dword [ebp - 0x14]
mov dword [esi + 4], eax
test eax, eax
je 0x487302
inc eax
push eax
call fcn.0062f5c7
mov ecx, dword [esi + 4]
mov dword [esi], eax
mov byte [eax + ecx], 0
push dword [esi + 4]
push dword [esi]
push dword [ebp - 0x250]
push edi
call fcn.00483c58
add esp, 0x14
test eax, eax
je 0x487312
cmp eax, 0x600
je 0x487312
mov ecx, esi
call fcn.00487094
call fcn.00470279
test al, al
jne 0x487302
push edi
call fcn.00482f78
pop ecx
lea ecx, [ebp - 0x24c]
call fcn.0046b2ee
jmp 0x48719a
call fcn.00470279
test al, al
jne 0x487322
push edi
call fcn.00482f78
pop ecx
lea ecx, [ebp - 0x24c]
call fcn.0046b2ee
jmp 0x487241
test edi, edi
jne 0x48733d
call fcn.0046ff93
mov edi, eax
mov eax, dword [ebp - 0x248]
push ebx
push dword [eax]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x4873a6
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x250], eax
push ebx
test eax, eax
je 0x4873a0
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi + 4], eax
test eax, eax
je 0x4873a6
inc eax
push eax
call fcn.0062f5c7
pop ecx
mov ecx, dword [esi + 4]
mov dword [esi], eax
mov byte [eax + ecx], 0
push dword [esi + 4]
push dword [ebp - 0x250]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push dword [esi]
call fcn.00630ee0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ebx, dword [ebp - 0x248]
xor eax, eax
cmp dword [esi], eax
jne 0x487425
push eax
push 0x80
push 3
push eax
push 1
push connect
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x487425
xor ebx, ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 4], eax
test eax, eax
je 0x487425
inc eax
mov dword [ebp - 0x250], ebx
push eax
call fcn.0062f5c7
pop ecx
mov ecx, dword [esi + 4]
mov dword [esi], eax
push ebx
mov byte [eax + ecx], bl
lea eax, [ebp - 0x250]
push eax
push dword [esi + 4]
push dword [esi]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x250]
cmp eax, dword [esi + 4]
je 0x487425
mov ecx, esi
call fcn.00487094
xor eax, eax
cmp eax, dword [esi + 4]
sbb eax, eax
neg eax
call fcn.0062fc3a
ret 0xc