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

Disassembly:
sub esp, 0x8c
push ebp
push esi
mov esi, dword [esp + 0x98]
push edi
xor edi, edi
cmp esi, edi
mov dword [esp + 0x14], edi
je 0x50424f
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebp, eax
cmp ebp, edi
mov dword [esp + 0x2c], ebp
je 0x50424f
lea eax, [esp + 0x3c]
push ebx
mov ebx, dword [sym.imp.GDI32.dll_GetObjectA]
push eax
push 0x18
push esi
call ebx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
push edi
lea eax, [esp + 0x9c]
mov dword [esp + 0x60], ecx
push edi
push eax
lea ecx, [esp + 0x64]
push edi
push ecx
push ebp
mov dword [esp + 0x70], 0x28
mov dword [esp + 0x78], edx
mov word [esp + 0x7c], 1
mov word [esp + 0x7e], 0x20
mov dword [esp + 0x80], edi
mov dword [esp + 0x84], edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x8c], edi
mov dword [esp + 0x90], edi
mov dword [esp + 0x94], edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov edi, eax
test edi, edi
je 0x504237
push edi
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
mov dword [esp + 0x40], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x38], ebp
je 0x50421c
lea edx, [esp + 0x80]
push edx
push 0x18
push edi
call ebx
mov eax, dword [esp + 0x8c]
mov ecx, eax
and ecx, reloc.WSOCK32.dll_closesocket
jns 0x503f59
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x503f74
inc eax
mov edx, eax
and edx, reloc.WSOCK32.dll_closesocket
jns 0x503f6b
dec edx
or edx, 0xfffffffc
inc edx
jne 0x503f5b
mov dword [esp + 0x8c], eax
push esi
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x30]
xor ebx, ebx
push 0xcc0020
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x4c]
push ebx
push ebx
push ebp
push eax
push ecx
push ebx
push ebx
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
push 0x660
push 2
mov dword [esp + 0x1c], 0x64
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
push ebx
push ebx
push closesocket
lea eax, [esi + 0x10]
push closesocket
push eax
mov dword [esi], 0x20
mov dword [esi + 4], 1
mov dword [esi + 0xc], ebx
mov dword [esi + 8], ebx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0xa4]
xor ecx, ecx
mov cl, ah
mov edx, dword [esp + 0x94]
mov byte [esp + 0x12], cl
mov ecx, dword [esp + 0x88]
shr eax, 0x10
mov byte [esp + 0x13], al
lea eax, [ecx - 1]
imul eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x48]
add eax, edx
test ecx, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebx
jle 0x5041c5
mov edx, dword [esp + 0x44]
xor ebp, ebp
test edx, edx
jle 0x5041a3
mov eax, dword [esp + 0x14]
add eax, 2
shl eax, 4
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
xor ecx, ecx
cmp ebp, edx
mov dword [esp + 0x28], ebp
lea eax, [eax + ebp*4]
jge 0x504196
test ecx, ecx
jne 0x504098
mov dl, byte [esp + 0xa4]
cmp byte [eax + 2], dl
jne 0x50408c
mov dl, byte [esp + 0x12]
cmp byte [eax + 1], dl
jne 0x50408c
mov dl, byte [esp + 0x13]
cmp byte [eax], dl
jne 0x50408c
mov ecx, 1
jmp 0x504090
add eax, 4
inc ebp
mov edx, dword [esp + 0x44]
cmp ebp, edx
jl 0x504064
cmp ebp, dword [esp + 0x28]
jle 0x504196
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 8]
cmp ecx, eax
jb 0x5040e3
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
add eax, 0x640
push 2
add esi, 0x64
push eax
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
mov edx, dword [esi + 8]
mov ecx, dword [esp + 0x28]
lea edi, [ebx + 1]
add edx, 2
push edi
push ebp
shl edx, 4
push ebx
add edx, esi
push ecx
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0x10]
lea ebx, [esi + 0x10]
cmp eax, ecx
jge 0x504110
mov dword [ebx], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jge 0x50411e
mov dword [esi + 0x14], eax
cmp ebp, dword [esi + 0x18]
jle 0x504126
mov dword [esi + 0x18], ebp
cmp edi, dword [esi + 0x1c]
jle 0x50412e
mov dword [esi + 0x1c], edi
mov ecx, dword [esi + 8]
inc ecx
mov eax, ecx
mov dword [esi + 8], ecx
cmp eax, 0x7d0
jne 0x50418a
mov eax, dword [esp + 0x2c]
push esi
push eax
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov edi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x50416a
push 2
push edi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x50416e
mov dword [esp + 0x18], edi
push 0
push 0
push closesocket
push closesocket
push ebx
mov dword [esi + 8], 0
call dword [sym.imp.USER32.dll_SetRect]
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
inc ebp
cmp ebp, edx
jl 0x50404f
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x8c]
sub eax, ecx
mov ecx, dword [esp + 0x48]
inc ebx
mov dword [esp + 0x20], eax
cmp ebx, ecx
mov dword [esp + 0x1c], ebx
jl 0x504037
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
push esi
add ecx, 2
shl ecx, 4
push ecx
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov esi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x5041f7
push 2
push esi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x5041fb
mov dword [esp + 0x18], esi
mov edx, dword [esp + 0x34]
push edx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x30]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ebp, dword [esp + 0x30]
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x18]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x8c
ret 8
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x8c
ret 8