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

Disassembly:
sub esp, 0x1b4
mov eax, dword [0x58bb30]
xor eax, esp
mov dword [esp + 0x1b0], eax
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0x11c], 0
mov ecx, dword [esp + 0x1c4]
push edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x124], 0
mov dword [esp + 0x128], 0
mov dword [esp + 0x12c], 0
mov dword [esp + 0x130], 0x181fff00
mov dword [esp + 0x134], 0x7fffff80
mov dword [esp + 0x138], 0xffffffff
mov dword [esp + 0x13c], 0x3ff000
mov dword [esp + 0x140], 0
mov dword [esp + 0x144], 0
mov dword [esp + 0x148], 0
mov dword [esp + 0x14c], 0x3f80
mov dword [esp + 0x150], 0x181fff00
mov dword [esp + 0x154], 0x7ffffe00
mov dword [esp + 0x158], 0xfffffffc
mov dword [esp + 0x15c], 0x3ff003
mov dword [esp + 0x160], 0
mov dword [esp + 0x164], 0
mov dword [esp + 0x168], 0
mov dword [esp + 0x16c], 0x3ffc0
mov dword [esp + 0x170], 0x183fff00
mov dword [esp + 0x174], 0x7ffffe00
mov dword [esp + 0x178], 0xfffffff8
mov dword [esp + 0x17c], 0x3ff00e
mov dword [esp + 0x180], 0
mov dword [esp + 0x184], 0x1c0
mov dword [esp + 0x188], 0x7fc0
mov dword [esp + 0x18c], 0x180fff00
mov dword [esp + 0x190], 0x7e3fff00
mov dword [esp + 0x194], 0xfffffe00
mov dword [esp + 0x198], 0x3fffff0
mov dword [esp + 0x19c], 0x3ff01c
mov dword [esp + 0x1a0], 0x3c0
mov dword [esp + 0x1a4], 0x3f80
mov dword [esp + 0x1a8], 0x3ff00
mov dword [esp + 0x1ac], 0x183ffc00
mov dword [esp + 0x1b0], 0x7efffc00
mov dword [esp + 0x1b4], 0xfffffe00
mov dword [esp + 0x1b8], 0x3fffff0
mov dword [esp + 0x1bc], 0x3ff01c
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0x181fff00
mov dword [esp + 0x94], 0x7fffff80
mov dword [esp + 0x98], 0x7f
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xac], 0x3f80
mov dword [esp + 0xb0], 0x181fff00
mov dword [esp + 0xb4], 0x7ffffe00
mov dword [esp + 0xb8], 0x7c
mov dword [esp + 0xbc], 0
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc4], 0
mov dword [esp + 0xc8], 0
mov dword [esp + 0xcc], 0x3ffc0
mov dword [esp + 0xd0], 0x183fff00
mov dword [esp + 0xd4], 0x7ffffe00
mov dword [esp + 0xd8], 0x78
mov dword [esp + 0xdc], 0
mov dword [esp + 0xe0], 0
mov dword [esp + 0xe4], 0x1c0
mov dword [esp + 0xe8], 0x7fc0
mov dword [esp + 0xec], 0x180fff00
mov dword [esp + 0xf0], 0x7e2aaa00
mov dword [esp + 0xf4], 0x7924800
mov dword [esp + 0xf8], 0x70
mov dword [esp + 0xfc], 0
mov dword [esp + 0x100], 0x3c0
mov ebp, dword [ecx + 0x18]
mov edx, dword [ecx + 8]
mov ebx, dword [ecx + 0x14]
mov edi, dword [ecx + 0x10]
lea eax, [ebp + 1]
mov dword [esp + 0x104], 0x3f80
mov dword [ecx + 0x18], eax
mov eax, dword [ecx + 0x20]
mov dword [esp + 0x108], 0x3ff00
mov dword [esp + 0x10c], 0x183ffc00
mov dword [esp + 0x110], 0x7eeaa800
mov dword [esp + 0x114], 0x7924800
mov dword [esp + 0x118], 0x70
mov dword [esp + 0x11c], 0
mov dword [esp + 0x6c], 0x44000000
mov dword [esp + 0x70], 0x28000000
mov dword [esp + 0x74], 0xfe000000
mov dword [esp + 0x78], 0x28000000
mov dword [esp + 0x7c], 0x44000000
mov dword [esp + 0x38], ebp
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x34], eax
test eax, eax
jne 0x50cb88
cmp ebx, 0x20
jg 0x50cb88
test edx, edx
sete al
lea edi, [edi + eax*2]
dec edi
cmp edi, 0xffffffe0
jl 0x50d1c3
cmp edi, dword [esi + 0xe54]
jg 0x50d1c3
xor edx, edx
mov eax, ebp
mov ecx, 0x14
div ecx
cmp edx, 5
sbb eax, eax
and eax, edx
xor ecx, ecx
mov dword [esp + 0x30], eax
lea eax, [esi + 8]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
lea ebp, [ecx + 0x64]
cmp dword [eax], 1
mov edx, dword [esp + 0x24]
jne 0x50cc05
cmp dword [eax + 8], edx
je 0x50cc05
mov ecx, dword [eax + 0x10]
mov edx, ecx
sub edx, edi
jns 0x50cbde
mov edx, edi
sub edx, ecx
mov esi, dword [eax + 0x14]
mov ecx, esi
sub ecx, ebx
jns 0x50cbeb
mov ecx, ebx
sub ecx, esi
cmp edx, 0x32
mov edx, dword [esp + 0x24]
jae 0x50cc01
cmp ecx, 0xc
jae 0x50cc01
mov ecx, eax
mov dword [esp + 0x2c], ecx
jmp 0x50cc05
mov ecx, dword [esp + 0x2c]
add eax, 0x24
sub ebp, 1
jne 0x50cbc3
test ecx, ecx
je 0x50cc44
cmp dword [ecx + 0x14], ebx
jg 0x50cc2f
cmp ebx, 0x18
jae 0x50cc38
inc ebx
mov byte [esp + 0x12], 1
mov dword [esp + 0x20], ebx
mov byte [esp + 0x13], 0
jmp 0x50ccb1
test ebx, ebx
jle 0x50cc38
dec ebx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x12], 1
mov byte [esp + 0x13], 0
jmp 0x50ccb1
mov ecx, dword [esp + 0x14]
xor esi, esi
add ecx, 0x10
mov dword [esp + 0x20], ebx
cmp dword [ecx - 8], 4
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
jne 0x50cc8b
mov byte [esp + 0x12], 0
mov byte [esp + 0x13], 0
cmp dword [ecx], edx
je 0x50cc8b
mov edx, dword [ecx + 8]
mov eax, edx
sub eax, edi
mov byte [esp + 0x12], 0
jns 0x50cc81
mov eax, edi
sub eax, edx
mov byte [esp + 0x13], 0
cmp eax, 0x46
jl 0x50cc9a
inc esi
add ecx, 0x24
cmp esi, 0x64
jae 0x50ccb6
mov edx, dword [esp + 0x24]
jmp 0x50cc51
cmp ebx, 0x18
jae 0x50cca4
inc ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], 0
mov byte [esp + 0x13], 1
cmp ebx, 0x18
jbe 0x50cce8
cmp dword [esp + 0x34], 0
mov ebp, dword [esp + 0x1c]
jne 0x50ccec
mov eax, dword [ebp + 0xc]
cmp ebx, eax
je 0x50ccec
jge 0x50ccd6
cmp ebx, 0x18
jae 0x50cce1
inc ebx
mov dword [esp + 0x20], ebx
cmp ebx, eax
jle 0x50cce1
test ebx, ebx
jle 0x50cce1
dec ebx
mov dword [esp + 0x20], ebx
mov byte [esp + 0x12], 1
jmp 0x50ccec
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
xor dl, dl
xor esi, esi
mov byte [esp + 0x1b], dl
add ecx, 0x24
jmp 0x50cd00
cmp dword [ecx - 0x1c], 1
jne 0x50cd23
mov eax, dword [ecx]
cmp eax, dword [ebp + 0x1c]
je 0x50cd23
mov edx, dword [ecx - 0xc]
mov eax, edx
sub eax, edi
jns 0x50cd1a
mov eax, edi
sub eax, edx
cmp eax, 0x40
jl 0x50cdc5
inc esi
add ecx, 0x24
cmp esi, 0x64
jb 0x50cd00
mov al, byte [esp + 0x1b]
cmp dword [ebp + 0x20], 0
mov dword [esp + 0x3c], 0x16
mov dword [esp + 0x40], 0x20
mov dword [esp + 0x44], 0x30
mov dword [esp + 0x48], 0x20
mov dword [esp + 0x4c], 0x46
mov dword [esp + 0x50], 0x29
mov dword [esp + 0x54], 0x68
mov dword [esp + 0x58], 0x20
mov dword [esp + 0x5c], 0x8b
mov dword [esp + 0x60], 0x20
mov dword [esp + 0x64], 0xa9
mov dword [esp + 0x68], 0x20
jne 0x50ce29
cmp ebx, 0x18
ja 0x50ce29
cmp dword [esp + 0x2c], 0
jne 0x50ce29
test al, al
jne 0x50ce29
mov ecx, dword [ebp + 0x10]
xor eax, eax
cmp dword [esp + eax*8 + 0x3c], ecx
je 0x50cdd0
inc eax
cmp eax, 6
jb 0x50cdb7
jmp 0x50ce29
mov al, 1
mov byte [esp + 0x1b], al
jmp 0x50cd30
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
imul ecx, edx, 0x9e3779bb
imul eax, edx, 0xc6ef3760
shr ecx, 0x1b
or ecx, eax
mov eax, dword [esp + 0x14]
lea esi, [ecx + ecx*4]
mov ecx, dword [eax + 4]
xor ecx, edx
ror edx, 6
mov eax, ecx
shl eax, 9
xor edx, eax
mov eax, dword [esp + 0x14]
xor edx, ecx
rol ecx, 0xd
mov dword [eax], edx
mov dword [eax + 4], ecx
mov eax, 0xcccccccd
mul esi
shr edx, 4
lea eax, [edx + edx*4]
shl eax, 2
sub esi, eax
jne 0x50ce29
mov edi, dword [ebp + 0x10]
mov dword [ebp + 0x20], 0x64
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x50ce8c
xor esi, esi
xor eax, eax
jmp 0x50ce40
lea edx, [eax*8]
cmp dword [esp + edx + 0x3c], edi
je 0x50ce55
inc eax
cmp eax, 6
jb 0x50ce40
jmp 0x50ce59
mov esi, dword [esp + edx + 0x40]
cmp ebx, esi
jge 0x50ce69
inc ebx
mov byte [esp + 0x12], 1
mov dword [esp + 0x20], ebx
jmp 0x50ce71
mov dword [esp + 0x30], 4
dec ecx
cmp byte [esp + 0x1b], 0
mov eax, ecx
mov dword [ebp + 0x20], ecx
je 0x50ce8c
test eax, eax
jne 0x50ce8c
mov dword [ebp + 0x20], 1
lea ecx, [eax + 1]
cmp dword [esp + 0x2c], 0
jne 0x50d0d5
cmp byte [esp + 0x13], 0
jne 0x50d0d5
test ecx, ecx
jne 0x50d0d5
mov edx, dword [esp + 0x28]
lea ebp, [ecx + 0x64]
mov ebx, dword [esp + 0x1c]
xor esi, esi
cmp dword [edx], 3
jne 0x50cf32
mov eax, dword [edx + 8]
cmp eax, dword [ebx + 8]
je 0x50cf32
cmp dword [esp + 0x24], 0
mov ecx, dword [edx + 0x10]
jne 0x50cedc
lea eax, [edi + 0x20]
cmp ecx, eax
jl 0x50cf32
sub ecx, edi
sub ecx, 0x20
jmp 0x50cee6
cmp ecx, edi
jg 0x50cf32
mov eax, edi
sub eax, ecx
mov ecx, eax
cmp ecx, 0x28
jae 0x50ceed
mov esi, edx
cmp ecx, 0x1e
jae 0x50cf32
cmp dword [esi + 0x18], 5
jbe 0x50cf32
mov eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x14]
dec eax
push 0
push 0xc8
push 0xc8
push 0xff
push dword [esi + 0x14]
push eax
push 5
push 0xa
push 0
lea eax, [esp + 0x90]
push eax
call fcn.00512cf0
mov edx, dword [esp + 0x28]
mov dword [esi], 0
add edx, 0x24
mov dword [esp + 0x28], edx
sub ebp, 1
jne 0x50ceb7
mov ebx, dword [esp + 0x20]
test esi, esi
je 0x50d0d1
cmp dword [esp + 0x24], 0
lea esi, [ebx + 6]
mov eax, dword [esp + 0x14]
push 0xffffe0e0
push esi
mov ebp, dword [eax + 0xe5c]
jne 0x50d022
lea eax, [edi + 0x22]
push eax
push dword [ebp + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
test eax, eax
je 0x50cf7f
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x14]
push 0xffff8282
push esi
mov ebp, dword [eax + 0xe5c]
lea eax, [edi + 0x23]
push eax
push dword [ebp + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
test eax, eax
je 0x50cfa2
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x14]
lea ebp, [edi + 0x24]
push 0xffff6464
push esi
push ebp
mov eax, dword [eax + 0xe5c]
mov dword [esp + 0x40], eax
push dword [eax + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
mov ecx, eax
test ecx, ecx
je 0x50cfcf
mov eax, dword [esp + 0x34]
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x14]
push 0xffff0000
mov esi, dword [eax + 0xe5c]
lea eax, [ebx + 5]
push eax
push ebp
push dword [esi + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
test eax, eax
je 0x50cff2
mov dword [esi + 8], eax
mov eax, dword [esp + 0x14]
push 0xffff0000
mov esi, dword [eax + 0xe5c]
lea eax, [ebx + 7]
push eax
push ebp
push dword [esi + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
mov ebp, dword [esp + 0x1c]
test eax, eax
je 0x50d0d5
mov dword [esi + 8], eax
jmp 0x50d0d5
lea eax, [edi - 3]
push eax
push dword [ebp + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
test eax, eax
je 0x50d035
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x14]
push 0xffff8282
push esi
mov ebp, dword [eax + 0xe5c]
lea eax, [edi - 4]
push eax
push dword [ebp + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
test eax, eax
je 0x50d058
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x14]
lea ebp, [edi - 5]
push 0xffff6464
push esi
push ebp
mov eax, dword [eax + 0xe5c]
mov dword [esp + 0x40], eax
push dword [eax + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
mov ecx, eax
test ecx, ecx
je 0x50d085
mov eax, dword [esp + 0x34]
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x14]
push 0xffff0000
mov esi, dword [eax + 0xe5c]
lea eax, [ebx + 5]
push eax
push ebp
push dword [esi + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
test eax, eax
je 0x50d0a8
mov dword [esi + 8], eax
mov eax, dword [esp + 0x14]
push 0xffff0000
mov esi, dword [eax + 0xe5c]
lea eax, [ebx + 7]
push eax
push ebp
push dword [esi + 4]
call sub.gdiplus.dll_GdipBitmapSetPixel
mov ebp, dword [esp + 0x1c]
test eax, eax
je 0x50d0d5
mov dword [esi + 8], eax
jmp 0x50d0d5
mov ebp, dword [esp + 0x1c]
cmp byte [esp + 0x12], 0
je 0x50d0f4
cmp dword [esp + 0x30], 0
jne 0x50d0f4
mov eax, dword [esp + 0x38]
xor edx, edx
mov ecx, 5
div ecx
mov dword [esp + 0x30], edx
movzx edx, byte [ebp + 4]
movzx ebx, byte [ebp + 5]
movzx esi, byte [ebp + 6]
mov ebp, dword [esp + 0x14]
add ebp, 0x18
mov dword [esp + 0x28], 0x64
nop
mov eax, dword [ebp - 0x10]
cmp eax, 2
je 0x50d11d
cmp eax, 3
jne 0x50d171
mov eax, dword [ebp]
mov ecx, eax
sub ecx, edi
jns 0x50d12a
mov ecx, edi
sub ecx, eax
cmp ecx, 0x3c
jae 0x50d171
mov eax, 0x3c
sub eax, ecx
add edx, eax
cmp edx, 0xff
jbe 0x50d145
mov edx, 0xff
mov eax, 0x3c
sub eax, ecx
add ebx, eax
cmp ebx, 0xff
jbe 0x50d15b
mov ebx, 0xff
mov eax, 0x3c
sub eax, ecx
add esi, eax
cmp esi, 0xff
jbe 0x50d171
mov esi, 0xff
add ebp, 0x24
sub dword [esp + 0x28], 1
jne 0x50d110
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
shl ecx, 5
cmp dword [ebp + 8], 0
sete al
movzx eax, al
push eax
push esi
mov esi, dword [esp + 0x28]
lea eax, [esp + 0x88]
push ebx
push edx
push esi
push edi
push 8
add eax, ecx
push 0xa
push eax
lea eax, [esp + 0x144]
add eax, ecx
mov ecx, dword [esp + 0x38]
push eax
call fcn.00512cf0
mov dword [ebp + 0x10], edi
mov dword [ebp + 0x14], esi
jmp 0x50d1c9
mov dword [ecx], 0
mov ecx, dword [esp + 0x1c0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0052f708
add esp, 0x1b4
ret 4