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

Disassembly:
mov ecx, dword [0xd63550]
sub esp, 0x64
push ebx
xor ebx, ebx
cmp ecx, ebx
push esi
push edi
je 0x505281
mov eax, dword [0xd63554]
mov esi, dword [esp + 0x74]
sub eax, ecx
sar eax, 5
cmp esi, eax
jae 0x505281
shl esi, 5
cmp dword [esi + ecx], 3
jne 0x505281
push 0xffffffffffffffff
push ebx
push 0x8f1e08
lea ecx, [esp + 0x18]
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x1c], bl
call fcn.004013c0
mov eax, dword [0xd63550]
push 0xffffffffffffffff
lea ecx, [esi + eax + 4]
push ebx
push ecx
lea ecx, [esp + 0x18]
call fcn.0042a0c0
mov eax, 0x886b44
mov dword [esp + 0x4c], eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
mov edi, 0x10
cmp eax, edi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
jae 0x505112
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x50]
call fcn.00504f70
test al, al
je 0x50525c
mov edx, dword [esp + 0x7c]
mov esi, dword [esp + 0x78]
push 0x20
push edx
push esi
lea ecx, [esp + 0x34]
call fcn.00502350
test al, al
je 0x50525c
lea ecx, [esp + 0x28]
call fcn.005028a0
test al, al
je 0x50525c
mov eax, dword [esp + 0x60]
cmp eax, ebx
mov edx, eax
jne 0x505160
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x54]
cmp eax, ebx
push ebp
je 0x50516e
mov ebp, dword [eax + 4]
jmp 0x505170
xor ebp, ebp
mov ecx, dword [esp + 0x34]
cmp ecx, ebx
je 0x50517d
mov edi, dword [ecx + 4]
jmp 0x50517f
xor edi, edi
push 0xcc0020
push ebx
push eax
push edx
lea ecx, [esp + 0x60]
call fcn.00502410
push eax
push ebp
push ebx
push ebx
lea ecx, [esp + 0x4c]
call fcn.00502410
push eax
mov eax, dword [esp + 0x68]
push edi
push ebx
push ebx
push eax
call dword [sym.imp.gdi32.dll_StretchDIBits]
mov ecx, dword [esp + 0x40]
cmp ecx, ebx
jne 0x5051b8
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x80]
cmp eax, ebx
jle 0x505229
mov ebp, dword [esp + 0x84]
mov edi, esi
neg edi
shl edi, 2
lea edx, [eax*4 - 4]
inc ebp
imul edx, esi
lea edx, [edx + ecx + 1]
mov dword [esp + 0x78], eax
cmp esi, ebx
jle 0x505213
mov eax, ebp
mov ecx, edx
lea esp, [esp]
mov byte [eax + 2], 0x80
mov bl, byte [ecx + 1]
mov byte [eax - 1], bl
mov bl, byte [ecx]
mov byte [eax], bl
mov bl, byte [ecx - 1]
mov byte [eax + 1], bl
add ecx, 4
add eax, 4
dec esi
jne 0x5051f0
mov esi, dword [esp + 0x7c]
xor ebx, ebx
lea eax, [esi*4]
add ebp, eax
mov eax, dword [esp + 0x78]
add edx, edi
dec eax
mov dword [esp + 0x78], eax
jne 0x5051e4
lea ecx, [esp + 0x2c]
call fcn.00502310
lea ecx, [esp + 0x50]
call fcn.00502310
cmp dword [esp + 0x28], 0x10
pop ebp
jb 0x505250
mov eax, dword [esp + 0x10]
push eax
call fcn.0043b58d
add esp, 4
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x64
ret
lea ecx, [esp + 0x28]
call fcn.00502310
lea ecx, [esp + 0x4c]
call fcn.00502310
cmp dword [esp + 0x24], edi
jb 0x505281
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0043b58d
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x64
ret