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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb4
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x50b266
mov edi, dword [ebp + 8]
test edi, edi
je 0x50b266
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x50b266
mov ebx, dword [ebp + 0x18]
test ebx, ebx
je 0x50b266
mov al, byte [esi + 0x17e]
test al, al
je 0x50b266
test edx, edx
jge 0x50a847
mov eax, dword [esi + 0xc]
mov dword [ebp + 0x14], eax
mov edx, eax
test ebx, ebx
jge 0x50a853
mov ecx, dword [esi + 0x10]
mov dword [ebp + 0x18], ecx
mov ebx, ecx
mov eax, dword [esi + 0x14c]
mov ecx, dword [esi + 0x184]
cmp eax, 0xffffffff
setne al
test ecx, ecx
setne cl
test al, al
mov byte [esp + 0x1f], al
mov byte [esp + 0x27], cl
jne 0x50abec
test cl, cl
jne 0x50abec
mov al, byte [esi + 0x17d]
test al, al
jne 0x50abec
cmp edx, dword [esi + 0xc]
jne 0x50a8d6
cmp ebx, dword [esi + 0x10]
jne 0x50a8d6
push 3
push edi
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov edx, dword [esi + 4]
mov eax, dword [esi + 0x34]
mov ecx, dword [ebp + 0x14]
push 0
push edx
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push ebx
push 0
push 0
push 0
push ebx
push ecx
push edx
push eax
push edi
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
lea ecx, [esp + 0x78]
push ecx
push edi
call dword [sym.imp.GDI32.dll_GetClipBox]
mov edi, dword [esp + 0x78]
mov ecx, dword [ebp + 0xc]
cmp edi, ecx
mov edx, edi
jg 0x50a8f1
mov edx, ecx
mov eax, dword [esp + 0x80]
cmp eax, edx
jge 0x50a902
mov dword [esp + 0x3c], eax
jmp 0x50a90e
cmp edi, ecx
mov dword [esp + 0x3c], edi
jg 0x50a90e
mov dword [esp + 0x3c], ecx
mov edx, dword [ebp + 0x14]
add ecx, edx
mov edx, eax
cmp eax, ecx
jl 0x50a91b
mov edx, ecx
cmp edi, edx
jle 0x50a923
mov eax, edi
jmp 0x50a929
cmp eax, ecx
jl 0x50a929
mov eax, ecx
mov ebx, dword [esp + 0x7c]
mov ecx, dword [ebp + 0x10]
cmp ebx, ecx
mov edi, ebx
jg 0x50a938
mov edi, ecx
mov edx, dword [esp + 0x84]
cmp edx, edi
jge 0x50a949
mov dword [esp + 0x40], edx
jmp 0x50a955
cmp ebx, ecx
mov dword [esp + 0x40], ebx
jg 0x50a955
mov dword [esp + 0x40], ecx
mov edi, dword [ebp + 0x18]
add ecx, edi
mov edi, edx
cmp edx, ecx
jl 0x50a962
mov edi, ecx
cmp ebx, edi
jle 0x50a96c
mov dword [esp + 0x48], ebx
jmp 0x50a978
cmp edx, ecx
mov dword [esp + 0x48], edx
jl 0x50a978
mov dword [esp + 0x48], ecx
mov ebx, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
sub eax, ebx
mov ebx, dword [esp + 0x48]
mov edx, eax
sub ebx, edi
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x90]
mov dword [esp + 0x30], edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x58], ebx
push eax
mov dword [esp + 0x94], 0x28
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], ebx
mov word [esp + 0xa0], 1
mov word [esp + 0xa2], 0x18
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
lea ecx, [esp + 0x14]
push 0
mov edi, eax
mov eax, dword [ebp + 8]
push ecx
lea edx, [esp + 0x9c]
push 0
push edx
push eax
mov dword [esp + 0x4c], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x50ab94
fild dword [esi + 0xc]
mov eax, dword [esp + 0x30]
fidiv dword [ebp + 0x14]
lea ecx, [eax + eax*2]
lea eax, [ecx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
test ebx, ebx
mov dword [esp + 0x50], eax
fstp dword [esp + 0x4c]
fild dword [esi + 0x10]
fidiv dword [ebp + 0x18]
fstp dword [esp + 0x6c]
jle 0x50ab94
mov edx, dword [esp + 0x48]
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0x5c], ebx
mov eax, dword [esp + 0x14]
mov edi, dword [ebp + 0x10]
sub eax, edi
mov dword [esp + 0x54], eax
fild dword [esp + 0x54]
fmul dword [esp + 0x6c]
fstp qword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
push edi
push ebx
call fcn.0051222d
add esp, 8
call fcn.00511abc
mov ecx, dword [esi + 0x10]
sub ecx, eax
jns 0x50aaa3
mov dword [esp + 0x18], 0
jmp 0x50aabb
push edi
push ebx
call fcn.0051222d
add esp, 8
call fcn.00511abc
mov ecx, dword [esi + 0x10]
sub ecx, eax
mov dword [esp + 0x18], ecx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
xor ebx, ebx
lea edi, [edx + eax]
mov eax, dword [esp + 0x30]
test eax, eax
jle 0x50ab66
mov eax, dword [ebp + 0xc]
mov edx, dword [esp + 0x3c]
mov ecx, ebx
sub esp, 8
sub ecx, eax
add ecx, edx
mov dword [esp + 0x5c], ecx
fild dword [esp + 0x5c]
fmul dword [esp + 0x54]
fstp qword [esp]
call fcn.0051215e
add esp, 8
call fcn.00511abc
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x50ab35
mov edx, dword [esp + 0x18]
mov ecx, esi
push edx
push eax
call fcn.0050b310
push eax
lea eax, [esp + 0x78]
push eax
mov ecx, esi
call fcn.0050b2a0
mov ecx, dword [eax]
mov dword [esp + 0x38], ecx
mov cl, byte [esp + 0x3a]
mov dl, byte [esp + 0x39]
mov al, byte [esp + 0x38]
jmp 0x50ab50
mov ecx, dword [esi + 0x30]
lea edx, [eax + eax*2]
imul ecx, dword [esp + 0x18]
mov eax, dword [esi + 0x34]
add ecx, edx
add ecx, eax
mov al, byte [ecx]
mov dl, byte [ecx + 1]
inc ecx
mov cl, byte [ecx + 1]
mov byte [edi], al
inc edi
mov eax, dword [esp + 0x30]
mov byte [edi], dl
inc edi
mov byte [edi], cl
inc edi
inc ebx
cmp ebx, eax
jl 0x50aad4
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
add ecx, eax
mov eax, dword [esp + 0x5c]
dec edx
dec eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x5c], eax
jne 0x50aa62
mov ebx, dword [esp + 0x58]
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x90]
push 0
push ecx
mov ecx, dword [esp + 0x48]
push edx
mov edx, dword [esp + 0x48]
push ebx
push 0
push 0
push 0
push ebx
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
mov ecx, dword [esp + 0x60]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
lea edx, [esp + 0x78]
push edx
push edi
call dword [sym.imp.GDI32.dll_GetClipBox]
mov edi, dword [esp + 0x78]
mov ecx, dword [ebp + 0xc]
cmp edi, ecx
mov edx, edi
jg 0x50ac07
mov edx, ecx
mov eax, dword [esp + 0x80]
cmp eax, edx
jge 0x50ac18
mov dword [esp + 0x3c], eax
jmp 0x50ac24
cmp edi, ecx
mov dword [esp + 0x3c], edi
jg 0x50ac24
mov dword [esp + 0x3c], ecx
mov edx, dword [ebp + 0x14]
add ecx, edx
mov edx, eax
cmp eax, ecx
jl 0x50ac31
mov edx, ecx
cmp edi, edx
jle 0x50ac39
mov eax, edi
jmp 0x50ac3f
cmp eax, ecx
jl 0x50ac3f
mov eax, ecx
mov ebx, dword [esp + 0x7c]
mov ecx, dword [ebp + 0x10]
cmp ebx, ecx
mov edi, ebx
jg 0x50ac4e
mov edi, ecx
mov edx, dword [esp + 0x84]
cmp edx, edi
jge 0x50ac5f
mov dword [esp + 0x40], edx
jmp 0x50ac6b
cmp ebx, ecx
mov dword [esp + 0x40], ebx
jg 0x50ac6b
mov dword [esp + 0x40], ecx
mov edi, dword [ebp + 0x18]
add ecx, edi
mov edi, edx
cmp edx, ecx
jl 0x50ac78
mov edi, ecx
cmp ebx, edi
jle 0x50ac82
mov dword [esp + 0x48], ebx
jmp 0x50ac8e
cmp edx, ecx
mov dword [esp + 0x48], edx
jl 0x50ac8e
mov dword [esp + 0x48], ecx
mov ebx, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
sub eax, ebx
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x6c]
sub ebx, edi
push eax
mov ecx, esi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x2c], 0
mov byte [esp + 0x2d], 0
mov byte [esp + 0x2e], 0
mov byte [esp + 0x2f], 0
call fcn.0050b690
mov edx, dword [ebp + 8]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x90]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x20]
push edx
mov dword [esp + 0x94], 0x28
mov dword [esp + 0x98], ecx
mov dword [esp + 0x9c], ebx
mov word [esp + 0xa0], 1
mov word [esp + 0xa2], 0x18
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edx, dword [ebp + 8]
mov edi, eax
push 0
lea eax, [esp + 0x3c]
push 0
push eax
lea ecx, [esp + 0x9c]
push 0
push ecx
push edx
mov dword [esp + 0x8c], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x3c]
mov edx, dword [ebp + 8]
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x40]
push 0xcc0020
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push ebx
push eax
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x50b200
mov eax, dword [esp + 0x20]
lea ecx, [eax + eax*2]
lea eax, [ecx*8 + 0x1f]
mov ecx, dword [ebp + 0x14]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0xc]
cmp ecx, eax
mov dword [esp + 0x60], eax
jne 0x50afac
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp + 0x18]
cmp ecx, eax
jne 0x50afac
mov edx, dword [esp + 0x48]
mov ecx, dword [ebp + 0x10]
sub eax, edx
add eax, ecx
test ebx, ebx
mov dword [esp + 0x18], eax
jle 0x50b200
mov eax, dword [esp + 0x3c]
mov ecx, dword [ebp + 0xc]
sub eax, ecx
mov dword [esp + 0x34], 0
mov dword [esp + 0x60], eax
mov dword [esp + 0x4c], ebx
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x38]
mov edx, dword [esp + 0x18]
add edi, ebx
mov ebx, dword [esi + 0x30]
mov eax, dword [esp + 0x60]
imul ebx, edx
mov ecx, edx
lea edx, [eax + eax*2]
imul ecx, dword [esi + 0xc]
add ebx, edx
mov edx, dword [esi + 0x34]
add ebx, edx
mov edx, dword [esp + 0x20]
test edx, edx
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x58], ebx
jle 0x50af81
mov dword [esp + 0x50], edx
jmp 0x50ae35
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x5c]
mov dl, byte [esp + 0x27]
test dl, dl
je 0x50ae4e
mov edx, dword [esi + 0x184]
add edx, eax
mov al, byte [edx + ecx]
mov byte [esp + 0x10], al
jmp 0x50ae53
mov byte [esp + 0x10], 0xff
mov ecx, dword [esp + 0x10]
xor eax, eax
mov al, byte [esi + 0x17c]
and ecx, 0xff
imul eax, ecx
sar eax, 8
mov byte [esp + 0x10], al
not al
mov byte [esp + 0x30], al
mov eax, dword [esi + 0x28]
test eax, eax
je 0x50aed0
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edx
push eax
mov ecx, esi
call fcn.0050b310
lea ecx, [esp + 0x70]
push eax
push ecx
mov ecx, esi
call fcn.0050b2a0
mov cl, byte [esi + 0x17d]
mov eax, dword [eax]
test cl, cl
mov dword [esp + 0x28], eax
je 0x50aeee
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x2b]
and ecx, 0xff
and edx, 0xff
imul ecx, edx
sar ecx, 8
mov byte [esp + 0x10], cl
not cl
mov byte [esp + 0x30], cl
jmp 0x50aeee
mov al, byte [ebx]
mov cl, byte [ebx + 1]
inc ebx
mov byte [esp + 0x28], al
inc ebx
mov byte [esp + 0x29], cl
mov dl, byte [ebx]
inc ebx
mov byte [esp + 0x2a], dl
mov eax, dword [esp + 0x28]
mov dword [esp + 0x58], ebx
cmp eax, dword [esp + 0x6c]
jne 0x50af01
mov cl, byte [esp + 0x1f]
test cl, cl
je 0x50af01
add edi, 3
jmp 0x50af69
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x10]
xor ebx, ebx
and ecx, 0xff
mov bl, byte [edi]
and edx, 0xff
and eax, 0xff
imul ebx, ecx
imul eax, edx
add ebx, eax
xor eax, eax
sar ebx, 8
mov byte [edi], bl
mov ebx, dword [esp + 0x29]
mov al, byte [edi + 1]
inc edi
and ebx, 0xff
imul eax, ecx
imul ebx, edx
add eax, ebx
mov ebx, dword [esp + 0x58]
sar eax, 8
mov byte [edi], al
inc edi
xor eax, eax
mov al, byte [edi]
imul eax, ecx
mov ecx, dword [esp + 0x2a]
and ecx, 0xff
imul ecx, edx
add eax, ecx
sar eax, 8
mov byte [edi], al
inc edi
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
inc ecx
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x50], eax
jne 0x50ae2d
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x4c]
add edi, edx
inc ecx
dec eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x4c], eax
jne 0x50ade7
jmp 0x50b200
fild dword [esp + 0x60]
test ebx, ebx
fidiv dword [ebp + 0x14]
fstp dword [esp + 0x70]
fild dword [esi + 0x10]
fidiv dword [ebp + 0x18]
fstp dword [esp + 0x58]
jle 0x50b200
mov eax, dword [esp + 0x48]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x50], ebx
mov ecx, dword [esp + 0x18]
mov edx, dword [ebp + 0x10]
sub ecx, edx
mov dword [esp + 0x60], ecx
fild dword [esp + 0x60]
fmul dword [esp + 0x58]
fstp qword [esp + 0x60]
mov edi, dword [esp + 0x64]
mov ebx, dword [esp + 0x60]
push edi
push ebx
call fcn.0051222d
add esp, 8
call fcn.00511abc
mov edx, dword [esi + 0x10]
sub edx, eax
jns 0x50b018
xor ebx, ebx
jmp 0x50b02c
push edi
push ebx
call fcn.0051222d
add esp, 8
call fcn.00511abc
mov ebx, dword [esi + 0x10]
sub ebx, eax
mov eax, ebx
mov ecx, dword [esp + 0x14]
imul eax, dword [esi + 0xc]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x34], 0
lea edi, [ecx + eax]
mov eax, dword [esp + 0x20]
test eax, eax
jle 0x50b1da
mov edx, dword [esp + 0x34]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x3c]
sub edx, eax
add edx, ecx
sub esp, 8
mov dword [esp + 0x68], edx
fild dword [esp + 0x68]
fmul dword [esp + 0x78]
fstp qword [esp]
call fcn.0051215e
add esp, 8
call fcn.00511abc
mov cl, byte [esp + 0x27]
test cl, cl
je 0x50b0a4
mov ecx, dword [esi + 0x184]
mov edx, dword [esp + 0x5c]
add ecx, eax
mov cl, byte [ecx + edx]
mov byte [esp + 0x10], cl
jmp 0x50b0a9
mov byte [esp + 0x10], 0xff
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [esi + 0x17c]
and edx, 0xff
imul ecx, edx
sar ecx, 8
mov byte [esp + 0x10], cl
not cl
mov byte [esp + 0x30], cl
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x50b121
push ebx
push eax
mov ecx, esi
call fcn.0050b310
push eax
lea eax, [esp + 0xc0]
push eax
mov ecx, esi
call fcn.0050b2a0
mov cl, byte [esi + 0x17d]
mov eax, dword [eax]
test cl, cl
mov dword [esp + 0x28], eax
je 0x50b14a
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x2b]
and ecx, 0xff
and edx, 0xff
imul ecx, edx
sar ecx, 8
mov byte [esp + 0x10], cl
not cl
mov byte [esp + 0x30], cl
jmp 0x50b14a
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0x34]
imul ecx, ebx
lea eax, [eax + eax*2]
add ecx, eax
add ecx, edx
mov dl, byte [ecx]
mov al, byte [ecx + 1]
inc ecx
mov byte [esp + 0x28], dl
mov byte [esp + 0x29], al
mov cl, byte [ecx + 1]
mov byte [esp + 0x2a], cl
mov eax, dword [esp + 0x28]
cmp eax, dword [esp + 0x6c]
jne 0x50b15d
mov cl, byte [esp + 0x1f]
test cl, cl
je 0x50b15d
add edi, 3
jmp 0x50b1c5
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x10]
xor ebx, ebx
and ecx, 0xff
mov bl, byte [edi]
and edx, 0xff
and eax, 0xff
imul ebx, ecx
imul eax, edx
add ebx, eax
xor eax, eax
sar ebx, 8
mov byte [edi], bl
mov ebx, dword [esp + 0x29]
mov al, byte [edi + 1]
inc edi
and ebx, 0xff
imul eax, ecx
imul ebx, edx
add eax, ebx
mov ebx, dword [esp + 0x4c]
sar eax, 8
mov byte [edi], al
inc edi
xor eax, eax
mov al, byte [edi]
imul eax, ecx
mov ecx, dword [esp + 0x2a]
and ecx, 0xff
imul ecx, edx
add eax, ecx
sar eax, 8
mov byte [edi], al
inc edi
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
jl 0x50b059
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
dec edx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x54]
add ecx, edx
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x50], eax
jne 0x50afdd
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x90]
push 0
mov edx, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x94]
push ecx
mov ecx, dword [esp + 0x48]
push eax
push 0
push 0
push 0
push eax
mov eax, dword [esp + 0x60]
push edx
mov edx, dword [ebp + 8]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
mov eax, dword [esp + 0x88]
mov esi, dword [esp + 0x74]
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14