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

Disassembly:
push 0x318
mov eax, 0x49badf
call fcn.00481051
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp eax, ebx
jne 0x45b82c
call fcn.0044879d
push eax
lea eax, [ebp - 0xcc]
call fcn.0044c6e9
mov dword [ebp - 4], ebx
call fcn.004487a3
mov edx, eax
call fcn.0044c82f
test al, al
je 0x45b754
push dword [ebp + 8]
lea eax, [ebp - 0xcc]
call fcn.0044c903
push ebx
push 0x80
push 3
push ebx
push 1
push connect
lea eax, [ebp - 0xcc]
call fcn.0044c68e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x45b701
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.0044c70c
jmp 0x45b8b0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x45b6ed
push esi
mov dword [ebp - 0x310], ebx
call fcn.00477302
pop ecx
push ebx
lea ecx, [ebp - 0x310]
push ecx
push esi
push eax
push edi
mov dword [ebp - 0x300], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x310], esi
je 0x45b81b
push dword [ebp - 0x300]
call fcn.00479b81
pop ecx
jmp 0x45b6ed
mov eax, edx
lea ecx, [ebp - 0xcc]
call fcn.0044c8f1
call fcn.004487a9
test al, al
je 0x45b771
call fcn.004487af
jmp 0x45b788
push 2
push ebx
lea eax, [ebp - 0xcc]
call fcn.0044c68e
push eax
call fcn.004585f4
add esp, 0xc
mov edi, eax
cmp edi, ebx
je 0x45b6ed
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x2fc]
push eax
push edi
lea ecx, [ebp - 0x30c]
call fcn.00458650
pop ecx
pop ecx
test eax, eax
jne 0x45b6ed
mov esi, dword [ebp - 0xd0]
cmp esi, ebx
je 0x45b6ed
push esi
call fcn.00477302
pop ecx
push esi
push eax
push dword [ebp - 0x30c]
mov dword [ebp - 0x300], eax
mov eax, edi
call fcn.00458720
add esp, 0xc
cmp eax, ebx
je 0x45b80d
cmp eax, 0x600
je 0x45b80d
push dword [ebp - 0x300]
call fcn.00479b81
pop ecx
call fcn.004487a9
test al, al
jne 0x45b6ed
call fcn.00458755
jmp 0x45b6ed
call fcn.004487a9
test al, al
jne 0x45b81b
call fcn.00458755
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xcc]
call fcn.0044c70c
jmp 0x45b8a4
push eax
push dword [ebp + 8]
call fcn.0044878e
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, ebx
je 0x45b8b0
push edi
call fcn.0044878e
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x30c], eax
push edi
cmp eax, ebx
jne 0x45b862
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x45b8b0
call fcn.0044878e
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x45b8b0
push esi
call fcn.00477302
pop ecx
push esi
push dword [ebp - 0x30c]
mov dword [ebp - 0x300], eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push dword [ebp - 0x300]
call fcn.0047c8d0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [ebp - 0x300], ebx
jne 0x45b932
push ebx
push 0x80
push 3
push ebx
push 1
push connect
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x45b92b
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x45b92b
push esi
mov dword [ebp - 0x31c], ebx
call fcn.00477302
pop ecx
push ebx
lea ecx, [ebp - 0x31c]
push ecx
push esi
push eax
push edi
mov dword [ebp - 0x300], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x31c], esi
je 0x45b923
push dword [ebp - 0x300]
call fcn.00479b81
pop ecx
mov dword [ebp - 0x300], ebx
cmp dword [ebp - 0x300], ebx
jne 0x45b932
xor eax, eax
jmp 0x45bb34
mov ecx, dword [ebp - 0x300]
lea eax, [ebp - 0x320]
push eax
push esi
lea esi, [ebp - 0x314]
lea edx, [ebp - 0x30c]
call fcn.004668af
push dword [ebp - 0x300]
mov dword [ebp - 0x318], eax
call fcn.00479b81
add esp, 0xc
cmp dword [ebp - 0x318], ebx
je 0x45b92b
push 0x2c
lea eax, [ebp - 0x40]
push ebx
push eax
call fcn.0047d070
mov esi, dword [ebp - 0x30c]
mov eax, dword [ebp - 0x314]
neg eax
mov dword [ebp - 0x38], eax
add esp, 0xc
xor eax, eax
mov edi, esi
imul edi, dword [ebp - 0x314]
inc eax
push 0x20
mov word [ebp - 0x34], ax
pop eax
mov word [ebp - 0x32], ax
push ebx
mov eax, edi
shl eax, 2
push ebx
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x308]
push eax
push ebx
lea eax, [ebp - 0x40]
push eax
push ebx
mov dword [ebp - 0x40], 0x28
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x324], edi
mov byte [ebp - 0x301], bl
mov dword [ebp - 0x308], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x320], eax
cmp eax, ebx
je 0x45b92b
mov dword [ebp - 0x300], ebx
cmp edi, ebx
jle 0x45baee
mov ecx, dword [ebp - 0x300]
mov eax, dword [ebp - 0x318]
mov edx, dword [ebp - 0x308]
shl ecx, 2
lea esi, [eax + ecx + 3]
mov al, byte [esi]
mov byte [ecx + edx + 3], al
mov eax, dword [ebp - 0x308]
add eax, ecx
cmp byte [eax + 3], 0xff
mov dword [ebp - 0x310], eax
jae 0x45ba81
movzx edx, byte [esi]
movzx eax, byte [esi - 1]
imul eax, edx
xor edx, edx
mov edi, 0xff
div edi
mov edx, dword [ebp - 0x310]
mov byte [ebp - 0x301], 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 - 0x308]
mov byte [ecx + edx + 1], al
movzx edx, byte [esi]
movzx eax, byte [esi - 3]
imul eax, edx
mov esi, edi
mov edi, dword [ebp - 0x324]
xor edx, edx
div esi
jmp 0x45ba96
mov dl, byte [esi - 1]
mov byte [eax], dl
mov al, byte [esi - 2]
mov edx, dword [ebp - 0x308]
mov byte [ecx + edx + 1], al
mov al, byte [esi - 3]
mov edx, dword [ebp - 0x308]
mov byte [ecx + edx + 2], al
mov eax, dword [ebp - 0x308]
mov edx, dword [eax + ecx]
cmp edx, dword [ebp + 0x10]
jne 0x45bad6
mov byte [eax + ecx], bl
mov eax, dword [ebp - 0x308]
mov byte [ecx + eax + 1], bl
mov eax, dword [ebp - 0x308]
mov byte [ecx + eax + 2], bl
mov eax, dword [ebp - 0x308]
mov byte [ecx + eax + 3], bl
mov byte [ebp - 0x301], 1
inc dword [ebp - 0x300]
cmp dword [ebp - 0x300], edi
jl 0x45b9fc
mov esi, dword [ebp - 0x30c]
push dword [ebp - 0x318]
call fcn.004667d2
pop ecx
push 0x98
call fcn.0047a58d
mov edi, eax
pop ecx
cmp edi, ebx
je 0x45bb15
lea ecx, [edi + 0x10]
call fcn.0044c6a9
mov ebx, edi
mov eax, dword [ebp - 0x320]
mov dword [ebx], eax
mov eax, dword [ebp - 0x314]
mov dword [ebx + 8], eax
mov al, byte [ebp - 0x301]
mov byte [ebx + 0xc], al
mov dword [ebx + 4], esi
mov eax, ebx
call fcn.0048109b
ret