Function at 0x4b05f0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5c
push ebp
mov ebp, dword [esp + 0x70]
test ebp, ebp
push esi
mov esi, dword [esp + 0x70]
push edi
jne 0x4b0608
mov ebp, esi
mov dword [esp + 0x78], ebp
mov edi, dword [esi + 8]
mov ecx, dword [esi]
cmp ecx, edi
jge 0x4b0a6a
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 4]
cmp eax, edx
jge 0x4b0a6a
cmp ecx, dword [ebp + 8]
jg 0x4b0a6a
cmp eax, dword [ebp + 0xc]
jg 0x4b0a6a
cmp edi, dword [ebp]
jl 0x4b0a6a
cmp edx, dword [ebp + 4]
jl 0x4b0a6a
mov edi, dword [esp + 0x6c]
cmp dword [edi], 0
push ebx
jne 0x4b066f
mov eax, dword [0x5980c4]
push 0xd
push eax
call fcn.004ac620
mov ebx, dword [esp + 0x74]
push eax
push ebx
call fcn.004ae020
test eax, eax
mov dword [edi], eax
je 0x4b06a6
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0xc]
mov ebx, dword [edi]
mov edx, dword [esi]
mov ebp, dword [esi + 8]
push ebx
sub ecx, eax
lea ebx, [ecx - 2]
push ebx
sub ebp, edx
lea ebx, [ebp - 2]
push ebx
lea ebx, [eax + 1]
push ebx
lea ebx, [edx + 1]
push ebx
mov ebx, dword [esp + 0x88]
push ecx
push ebp
push eax
push edx
push ebx
call fcn.004aac90
mov ebp, dword [esp + 0x7c]
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 8]
add ecx, 1
add edx, 1
sub eax, 1
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x28], edx
push ebp
lea edx, [esp + 0x28]
mov dword [esp + 0x30], eax
push edx
lea eax, [esp + 0x3c]
sub ecx, 1
push eax
mov dword [esp + 0x3c], ecx
call dword [sym.imp.USER32.dll_IntersectRect]
mov esi, dword [esp + 0x3c]
sub esi, dword [esp + 0x34]
mov ebp, dword [esp + 0x40]
sub ebp, dword [esp + 0x38]
test esi, esi
jle 0x4b0a69
test ebp, ebp
jle 0x4b0a69
cmp dword [edi + 4], 0
jne 0x4b0716
push ebx
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
test eax, eax
mov dword [edi + 4], eax
je 0x4b0a69
lea eax, [esi + 0xf]
cdq
and edx, 0xf
add eax, edx
mov ebx, eax
lea eax, [ebp + 0xf]
cdq
and edx, 0xf
add eax, edx
mov esi, eax
mov eax, dword [edi + 8]
sar ebx, 4
sar esi, 4
shl ebx, 4
shl esi, 4
test eax, eax
je 0x4b076a
cmp ebx, dword [edi + 0xc]
jg 0x4b074d
cmp esi, dword [edi + 0x10]
jle 0x4b07e5
test eax, eax
je 0x4b076a
mov ecx, dword [edi + 0xc]
cmp ebx, ecx
jge 0x4b075a
mov ebx, ecx
mov ecx, dword [edi + 0x10]
cmp esi, ecx
jge 0x4b0763
mov esi, ecx
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
xor eax, eax
push eax
push eax
lea edx, [edi + 0x14]
push edx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
push eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov ecx, esi
neg ecx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x64], eax
lea eax, [esp + 0x54]
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x84]
push eax
push ecx
mov dword [esp + 0x5c], 0x28
mov dword [esp + 0x60], ebx
mov word [esp + 0x68], 1
mov word [esp + 0x6a], 0x20
call dword [sym.imp.GDI32.dll_CreateDIBSection]
test eax, eax
mov dword [edi + 8], eax
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], esi
je 0x4b0a69
mov ebx, dword [esp + 0x80]
push 0
push 0
push ebx
call dword [sym.imp.GDI32.dll_GetRegionData]
mov esi, eax
test esi, esi
je 0x4b0a69
push esi
call fcn.004a49a0
mov ebp, eax
push ebp
push esi
push ebx
mov dword [esp + 0x2c], ebp
call dword [sym.imp.GDI32.dll_GetRegionData]
cmp dword [ebp + 8], 0
mov dword [esp + 0x10], 0
jbe 0x4b0a63
lea edx, [ebp + 0x20]
mov dword [esp + 0x78], edx
nop
mov eax, dword [esp + 0x78]
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.USER32.dll_IntersectRect]
mov ebx, dword [esp + 0x2c]
sub ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
sub esi, dword [esp + 0x28]
test ebx, ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x1c], esi
jle 0x4b0a4a
test esi, esi
jle 0x4b0a4a
mov eax, dword [edi + 8]
mov ecx, dword [edi + 4]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [edi + 4]
push 0
push edx
mov ebp, eax
call dword [0x58df74]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x74]
push 0xcc0020
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [edi + 4]
push ecx
push edx
push esi
push ebx
push 0
push 0
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
mov ecx, dword [esp + 0x70]
mov edx, dword [edi + 4]
push ecx
push edx
call dword [0x58df74]
mov eax, dword [edi + 4]
push ebp
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
call fcn.004a8910
movzx ecx, ah
movzx ebp, al
shr eax, 0x10
movzx edx, al
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x14], edx
mov dword [esp + 0x80], esi
jmp 0x4b08f4
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x70], ebx
jmp 0x4b0900
mov bl, byte [ecx]
mov esi, dword [esp + 0x14]
movzx eax, bl
sub esi, eax
imul esi, dword [0x58a64c]
mov eax, 0x80808081
imul esi
add edx, esi
mov esi, dword [esp + 0x18]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, bl
mov byte [ecx], al
mov bl, byte [ecx + 1]
add ecx, 1
movzx edx, bl
sub esi, edx
imul esi, dword [0x58a64c]
mov eax, 0x80808081
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, bl
mov byte [ecx], al
mov bl, byte [ecx + 1]
add ecx, 1
movzx edx, bl
mov esi, ebp
sub esi, edx
imul esi, dword [0x58a64c]
mov eax, 0x80808081
imul esi
add edx, esi
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, bl
mov byte [ecx], al
add ecx, 2
sub dword [esp + 0x70], 1
jne 0x4b0900
mov edx, dword [edi + 0xc]
sub edx, dword [esp + 0x7c]
sub dword [esp + 0x80], 1
lea ecx, [ecx + edx*4]
jne 0x4b08f0
xor eax, eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], eax
push 0xcc0020
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov eax, dword [edi + 0xc]
push 0
mov dword [esp + 0x50], eax
mov eax, dword [edi + 0x10]
mov ecx, eax
neg ecx
mov dword [esp + 0x54], ecx
mov ecx, dword [edi + 0x14]
lea edx, [esp + 0x4c]
push edx
mov edx, dword [esp + 0x88]
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
push edx
sub eax, ecx
push eax
mov eax, dword [esp + 0x40]
push 0
push ecx
mov ecx, dword [esp + 0x98]
push edx
mov edx, dword [esp + 0x50]
push edx
push eax
push ecx
mov dword [esp + 0x78], 0x28
mov word [esp + 0x84], 1
mov word [esp + 0x86], 0x20
mov dword [esp + 0x88], 0
call dword [sym.imp.GDI32.dll_StretchDIBits]
mov ebp, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
add dword [esp + 0x78], 0x10
add eax, 1
cmp eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
jb 0x4b0830
push ebp
call fcn.004a4a00
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x5c
ret 0x14