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

Disassembly:
push 0x414
mov eax, 0x50034d
call fcn.004d9a2f
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
cmp esi, ebx
jne 0x45f9ba
call fcn.0043b2c5
push eax
lea ecx, [ebp - 0xc0]
call fcn.0043a97e
mov dword [ebp - 4], ebx
call fcn.0043b2cb
mov ecx, eax
call fcn.0043a66a
test al, al
je 0x45f823
push dword [ebp + 8]
lea ecx, [ebp - 0xc0]
call fcn.0043a703
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea ecx, [ebp - 0xc0]
call fcn.0043a556
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x408], eax
cmp eax, 0xffffffff
jne 0x45f7cf
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0043a53c
jmp 0x45fa2e
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x45f7bb
push esi
mov dword [ebp - 0x400], ebx
call fcn.004d44bd
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x400]
push eax
push esi
push edi
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x400], esi
je 0x45f9a9
push edi
call fcn.004d6406
pop ecx
jmp 0x45f7bb
call fcn.0043b2cb
push eax
lea ecx, [ebp - 0xc0]
call fcn.0043a6e6
call fcn.0043b2d1
push eax
lea ecx, [ebp - 0x144]
call fcn.0043a97e
mov byte [ebp - 4], 1
call fcn.0043b2d7
test al, al
je 0x45f85f
call fcn.0043b2dd
mov dword [ebp - 0x400], eax
jmp 0x45f89a
push ebx
lea ecx, [ebp - 0x144]
call fcn.0043a556
push eax
call fcn.0046b539
pop ecx
pop ecx
mov esi, eax
push esi
lea ecx, [ebp - 0xc0]
call fcn.0043a556
push eax
call fcn.00466b80
pop ecx
pop ecx
mov dword [ebp - 0x400], eax
cmp esi, ebx
je 0x45f89a
push esi
call fcn.004d6406
pop ecx
cmp dword [ebp - 0x400], ebx
jne 0x45f8b5
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], bl
call fcn.0043a53c
jmp 0x45f7bb
push 0xffffffffffffffff
push dword [ebp + 8]
lea ecx, [ebp - 0x1c8]
mov dword [ebp - 0x40c], ebx
call fcn.0043a95a
push 0x50ab0c
push 0x50ab08
lea ecx, [ebp - 0x1c8]
mov byte [ebp - 4], 2
call fcn.0043aade
lea eax, [ebp - 0x3f8]
push eax
lea eax, [ebp - 0x40c]
push eax
push 1
lea ecx, [ebp - 0x1c8]
call fcn.0043a556
push eax
push dword [ebp - 0x400]
call fcn.004650fa
add esp, 0x14
test eax, eax
je 0x45f926
lea ecx, [ebp - 0x1c8]
mov byte [ebp - 4], 1
call fcn.0043a53c
jmp 0x45f8a2
mov esi, dword [ebp - 0x1cc]
cmp esi, ebx
je 0x45f912
push esi
call fcn.004d44bd
push esi
mov edi, eax
push edi
push dword [ebp - 0x40c]
push dword [ebp - 0x400]
call fcn.00466be7
add esp, 0x14
cmp eax, ebx
je 0x45f977
cmp eax, 0x600
je 0x45f977
push edi
call fcn.004d6406
pop ecx
call fcn.0043b2d7
test al, al
jne 0x45f912
push dword [ebp - 0x400]
call fcn.00466c02
pop ecx
jmp 0x45f912
call fcn.0043b2d7
test al, al
jne 0x45f98c
push dword [ebp - 0x400]
call fcn.00466c02
pop ecx
lea ecx, [ebp - 0x1c8]
mov byte [ebp - 4], 1
call fcn.0043a53c
lea ecx, [ebp - 0x144]
mov byte [ebp - 4], bl
call fcn.0043a53c
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0043a53c
jmp 0x45fa2a
cmp eax, ebx
jne 0x45f9c3
call fcn.0043b2b6
push esi
push dword [ebp + 8]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
cmp esi, ebx
je 0x45fa2e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x40c], eax
push esi
cmp eax, ebx
jne 0x45f9f1
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x45fa2e
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
cmp esi, ebx
je 0x45fa2e
push esi
call fcn.004d44bd
pop ecx
push esi
push dword [ebp - 0x40c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push edi
call fcn.004d8e20
add esp, 0xc
push dword [ebp - 0x40c]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp edi, ebx
jne 0x45faad
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x408], eax
cmp eax, 0xffffffff
je 0x45faa6
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
je 0x45faa6
push esi
mov dword [ebp - 0x418], ebx
call fcn.004d44bd
pop ecx
push ebx
mov edi, eax
lea eax, [ebp - 0x418]
push eax
push esi
push edi
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x408]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x418], esi
je 0x45faa2
push edi
call fcn.004d6406
pop ecx
xor edi, edi
cmp edi, ebx
jne 0x45faad
xor eax, eax
jmp 0x45fcbe
push 4
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x414]
push eax
push esi
push edi
call fcn.0045f69b
push edi
mov dword [ebp - 0x410], eax
call fcn.004d6406
add esp, 0x1c
cmp dword [ebp - 0x410], ebx
je 0x45faa6
push 0x2c
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.004d8ce0
mov esi, dword [ebp - 0x414]
mov eax, dword [ebp - 0x408]
neg eax
mov dword [ebp - 0x34], eax
add esp, 0xc
xor eax, eax
mov edi, esi
imul edi, dword [ebp - 0x408]
inc eax
push 0x20
mov word [ebp - 0x30], ax
pop eax
mov word [ebp - 0x2e], ax
push ebx
mov eax, edi
shl eax, 2
push ebx
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x404]
push eax
push ebx
lea eax, [ebp - 0x3c]
push eax
push ebx
mov dword [ebp - 0x3c], 0x28
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x420], edi
mov byte [ebp - 0x3f9], bl
mov dword [ebp - 0x404], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [ebp - 0x41c], eax
cmp eax, ebx
je 0x45faa6
mov dword [ebp - 0x400], ebx
cmp edi, ebx
jle 0x45fc63
mov ecx, dword [ebp - 0x400]
mov eax, dword [ebp - 0x410]
mov edx, dword [ebp - 0x404]
shl ecx, 2
lea esi, [eax + ecx + 3]
mov al, byte [esi]
mov byte [ecx + edx + 3], al
mov eax, dword [ebp - 0x404]
add eax, ecx
cmp byte [eax + 3], 0xff
mov dword [ebp - 0x40c], eax
jae 0x45fbf6
movzx edx, byte [esi]
movzx eax, byte [esi - 1]
imul eax, edx
xor edx, edx
mov edi, 0xff
div edi
mov edx, dword [ebp - 0x40c]
mov byte [ebp - 0x3f9], 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 - 0x404]
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 - 0x420]
xor edx, edx
div esi
jmp 0x45fc0b
mov dl, byte [esi - 1]
mov byte [eax], dl
mov al, byte [esi - 2]
mov edx, dword [ebp - 0x404]
mov byte [ecx + edx + 1], al
mov al, byte [esi - 3]
mov edx, dword [ebp - 0x404]
mov byte [ecx + edx + 2], al
mov eax, dword [ebp - 0x404]
mov edx, dword [eax + ecx]
cmp edx, dword [ebp + 0x10]
jne 0x45fc4b
mov byte [eax + ecx], bl
mov eax, dword [ebp - 0x404]
mov byte [ecx + eax + 1], bl
mov eax, dword [ebp - 0x404]
mov byte [ecx + eax + 2], bl
mov eax, dword [ebp - 0x404]
mov byte [ecx + eax + 3], bl
mov byte [ebp - 0x3f9], 1
inc dword [ebp - 0x400]
cmp dword [ebp - 0x400], edi
jl 0x45fb71
mov esi, dword [ebp - 0x414]
push dword [ebp - 0x410]
call fcn.0044f37f
push 0xa0
call fcn.004d5fab
pop ecx
mov edi, eax
pop ecx
mov dword [ebp - 0x420], edi
mov dword [ebp - 4], 3
cmp edi, ebx
je 0x45fc99
lea ecx, [edi + 0x18]
call fcn.0043a514
mov eax, edi
jmp 0x45fc9b
xor eax, eax
mov ecx, dword [ebp - 0x41c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x408]
mov dword [eax + 0x10], ecx
mov cl, byte [ebp - 0x3f9]
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], esi
mov byte [eax + 0x14], cl
call fcn.004d9ab2
ret