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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x16c
mov ebx, dword [esp + 0x188]
test ebx, ebx
jne 0x515620
mov eax, dword [esp + 0x194]
mov dword [eax], 0
xor eax, eax
add esp, 0x16c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x180]
mov eax, dword [edx + 0x7c]
mov dword [esp], eax
call sub.USER32.dll_GetDC
sub esp, 4
mov ecx, dword [esp + 0x180]
mov dword [esp + 0x48], eax
mov eax, dword [ecx + 0x78]
mov dword [esp + 0x58], eax
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call sub.GDI32.dll_SelectObject
sub esp, 8
mov ebp, dword [esp + 0x184]
mov dword [esp + 0x44], eax
xor eax, eax
add ebx, ebp
mov dword [esp + 0x3c], ebx
mov edx, dword [esp + 0x3c]
mov ebx, ebp
mov dword [esp + 0x40], eax
cmp ebp, edx
jmp 0x515782
mov dword [esp], ebx
mov eax, dword [0x5ecbec]
lea ecx, [esp + 0x15e]
mov dword [esp + 4], ecx
call dword [eax + 0x548]
movzx edx, word [esp + 0x15e]
add eax, ebx
mov dword [esp + 0x38], eax
lea eax, [esp + 0x58]
mov dword [esp], eax
mov eax, dword [esp + 0x180]
call fcn.005149f0
mov esi, eax
mov eax, dword [esp + 0x58]
cmp esi, eax
je 0x51577a
mov edi, dword [eax + 8]
mov eax, ebx
lea edx, [esp + 0x70]
mov dword [esp + 0xc], edx
sub eax, ebp
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov eax, dword [edi + 0xc]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x53c]
lea ecx, [esp + 0x50]
xor eax, eax
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x74]
sar eax, cl
mov dword [esp + 8], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call dword [edi + 0x1c]
mov eax, dword [0x5ecbec]
sub esp, 0x10
lea edx, [esp + 0x70]
mov dword [esp], edx
call dword [eax + 0x1e8]
mov edi, dword [esp + 0x18c]
test edi, edi
js 0x515ac3
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x40]
lea eax, [edx + ecx]
cmp eax, dword [esp + 0x18c]
jg 0x5158ef
add dword [esp + 0x40], edx
mov ebp, ebx
mov eax, dword [esi + 4]
mov dword [esp + 0x58], esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call sub.GDI32.dll_SelectObject
sub esp, 8
mov ebx, dword [esp + 0x38]
cmp ebx, dword [esp + 0x3c]
jb 0x515681
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x70]
sub ebx, ebp
xor esi, esi
mov edi, dword [eax + 8]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp + 4], ebp
mov eax, dword [edi + 0xc]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x53c]
mov dword [esp + 0x50], esi
lea ecx, [esp + 0x50]
mov eax, dword [esp + 0x74]
mov dword [esp + 0xc], ecx
mov ecx, dword [edi + 0x14]
sar eax, cl
mov dword [esp + 8], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
call dword [edi + 0x1c]
mov eax, dword [0x5ecbec]
sub esp, 0x10
lea edx, [esp + 0x70]
mov dword [esp], edx
call dword [eax + 0x1e8]
mov ebx, dword [esp + 0x18c]
test ebx, ebx
js 0x515b2e
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x40]
lea eax, [edx + ecx]
cmp eax, dword [esp + 0x18c]
jg 0x5158ef
add dword [esp + 0x40], edx
mov ebx, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov dword [esp + 4], edx
mov dword [esp], ecx
call sub.GDI32.dll_SelectObject
sub esp, 8
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x180]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x7c]
mov dword [esp], eax
call sub.USER32.dll_ReleaseDC
sub esp, 8
xor eax, eax
cmp ebx, dword [esp + 0x3c]
setb al
test dword [esp + 0x190], eax
je 0x515aa0
mov dword [esp + 0x3c], ebx
mov ebx, dword [esp + 0x184]
xor edi, edi
mov ecx, dword [esp + 0x3c]
mov eax, 0x20
mov word [esp + 0x15e], ax
cmp ebx, ecx
jae 0x515a7e
lea esi, [esp + 0x5e]
jmp 0x5158c5
movzx eax, word [esp + 0x5e]
cmp ax, 0x20
je 0x515ad0
mov word [esp + 0x15e], ax
mov ebx, dword [esp + 0x38]
cmp ebx, dword [esp + 0x3c]
jae 0x515ae4
mov dword [esp + 4], esi
mov eax, dword [0x5ecbec]
mov dword [esp], ebx
call dword [eax + 0x548]
add eax, ebx
cmp word [esp + 0x15e], 0x20
mov dword [esp + 0x38], eax
jne 0x5158a0
movzx eax, word [esp + 0x5e]
jmp 0x5158af
mov eax, dword [esp + 0x58]
xor ecx, ecx
mov ebx, ebp
mov dword [esp + 0x34], ecx
mov edi, dword [eax + 8]
lea eax, [esp + 0x70]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x1f0]
cmp ebp, dword [esp + 0x3c]
jae 0x515a0e
lea ebp, [esp + 0x4c]
lea esi, [esp + 0x60]
lea esi, [esi]
lea edi, [edi]
mov dword [esp], ebx
mov eax, dword [0x5ecbec]
lea edx, [esp + 0x15e]
mov dword [esp + 4], edx
call dword [eax + 0x548]
mov dword [esp + 0x24], ebp
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x28], edx
mov edx, 0x10
mov dword [esp + 0x20], ecx
xor ecx, ecx
mov dword [esp + 0x1c], edx
xor edx, edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
lea ecx, [eax + ebx]
mov dword [esp + 0x18], esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov eax, dword [edi + 0xc]
mov dword [esp + 0x38], ecx
mov dword [esp], 0
mov dword [esp + 4], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x538]
mov dword [esp + 4], esi
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], eax
lea eax, [esp + 0x70]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x1dc]
lea edx, [esp + 0x50]
xor eax, eax
mov dword [esp + 0xc], edx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x74]
sar eax, cl
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x70]
mov dword [esp], ecx
mov dword [esp + 4], eax
call dword [edi + 0x1c]
sub esp, 0x10
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x40]
lea eax, [edx + ecx]
cmp eax, dword [esp + 0x18c]
jg 0x515a0e
mov dword [esp + 0x34], edx
mov ebx, dword [esp + 0x38]
cmp ebx, dword [esp + 0x3c]
jb 0x515930
lea eax, [esp + 0x70]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x1e8]
cmp ebx, dword [esp + 0x3c]
jae 0x515ad7
mov eax, dword [esp + 0x190]
mov edx, dword [esp + 0x18c]
shr eax, 2
cmp dword [esp + 0x40], edx
setne dl
movzx edx, dl
test eax, edx
jne 0x515a6d
cmp ebx, dword [esp + 0x184]
jne 0x515ad7
mov eax, dword [esp + 0x190]
xor edx, edx
shr eax, 1
cmp dword [esp + 0x40], 0
sete dl
test eax, edx
je 0x515ad7
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x38]
add dword [esp + 0x40], ecx
jmp 0x515823
test byte [esp + 0x190], 2
mov ebx, dword [esp + 0x3c]
jne 0x515aa0
mov ebx, dword [esp + 0x184]
xor esi, esi
mov dword [esp + 0x40], esi
lea esi, [esi]
mov eax, dword [esp + 0x194]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x184]
mov dword [eax], edx
add esp, 0x16c
mov eax, ebx
pop ebx
sub eax, ecx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x50]
jmp 0x51575a
mov edi, ebx
jmp 0x5158af
mov eax, dword [esp + 0x34]
add dword [esp + 0x40], eax
jmp 0x515823
test edi, edi
je 0x515a7e
mov eax, dword [esp + 0x194]
mov ebp, dword [esp + 0x184]
mov edx, dword [esp + 0x184]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x180]
xor eax, eax
mov dword [esp + 0x10], eax
sub edi, ebp
mov eax, 0xffffffff
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], edx
mov dword [esp], ecx
call fcn.005155f0
jmp 0x515614
mov edx, dword [esp + 0x50]
jmp 0x51581b