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

Disassembly:
sub esp, 0x64
xor eax, eax
push ebx
push ebp
mov ebp, dword [esp + 0x84]
push esi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x30]
push eax
push 0x18
xor esi, esi
push ebp
mov dword [esp + 0x54], 0x28
mov word [esp + 0x60], 1
mov word [esp + 0x62], 0x18
xor ebx, ebx
mov dword [esp + 0x18], esi
call dword [sym.imp.GDI32.dll_GetObjectW]
cmp word [esp + 0x42], 0x20
jne 0x40dd23
mov ecx, dword [esp + 0x74]
mov esi, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push edi
push ecx
call esi
mov edx, dword [esp + 0x84]
mov edi, eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x48]
test eax, eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x50], edx
je 0x40da62
mov dword [esp + 0x14], eax
jmp 0x40daeb
push 0
push 0
lea ecx, [esp + 0x1c]
push ecx
push 0
lea edx, [esp + 0x5c]
push edx
push 0
mov word [esp + 0x72], 0x20
call dword [sym.imp.GDI32.dll_CreateDIBSection]
test eax, eax
mov dword [esp + 0x20], eax
je 0x40dcec
mov eax, dword [esp + 0x78]
push eax
call esi
push ebp
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
mov esi, eax
push esi
call ebp
mov ecx, dword [esp + 0x20]
push ecx
push edi
mov ebx, eax
call ebp
mov edx, dword [esp + 0x3c]
push 0xcc0020
push 0
push 0
push esi
push edx
mov ebp, eax
mov eax, dword [esp + 0x4c]
push eax
push 0
push 0
push edi
mov dword [esp + 0x40], ebp
call dword [sym.imp.GDI32.dll_BitBlt]
push ebp
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
push edi
call ebp
push ebx
push esi
call ebp
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov word [esp + 0x5a], 0x18
push 0
push 0
lea ecx, [esp + 0x2c]
push ecx
push 0
lea edx, [esp + 0x5c]
push edx
push 0
call dword [sym.imp.GDI32.dll_CreateDIBSection]
test eax, eax
mov dword [esp + 0x18], eax
je 0x40dce8
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x7c]
mov ebx, dword [esp + 0x84]
push 0xcc0020
push ecx
mov ecx, dword [esp + 0x90]
push edx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x84]
push eax
push ecx
push ebx
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
cdq
xor eax, edx
sub eax, edx
test eax, eax
mov dword [esp + 0x10], 0
jle 0x40dcb6
lea edx, [ebx + ebx*2]
and edx, reloc.WS2_32.dll_closesocket
jns 0x40db81
dec edx
or edx, 0xfffffffc
inc edx
neg edx
and edx, 3
mov dword [esp + 0x2c], edx
jmp 0x40db94
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
test eax, eax
mov ecx, eax
mov dword [esp + 0x28], eax
jle 0x40dc98
jmp 0x40dbb4
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x90]
sub eax, ecx
cmp eax, edx
jl 0x40dc82
add edx, ebx
cmp eax, edx
jge 0x40dc82
mov eax, dword [esp + 0x94]
cmp dword [esp + 0x10], eax
jl 0x40dc82
mov edx, dword [esp + 0x88]
add edx, eax
cmp dword [esp + 0x10], edx
jge 0x40dc82
mov cl, byte [ebp + 3]
or al, 0xff
sub al, cl
movzx edi, al
movzx eax, byte [ebp]
movzx ebx, cl
movzx ecx, byte [esi]
imul eax, ebx
imul ecx, edi
add ecx, eax
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
movzx edx, byte [esi + 1]
mov byte [esi], cl
imul edx, edi
movzx ecx, byte [ebp + 1]
imul ecx, ebx
add ecx, edx
mov eax, 0x80808081
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
movzx edx, byte [esi + 2]
mov byte [esi + 1], al
imul edx, edi
movzx ecx, byte [ebp + 2]
imul ecx, ebx
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x84]
add ecx, edx
mov eax, 0x80808081
imul ecx
add edx, ecx
mov ecx, dword [esp + 0x28]
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
mov byte [esi + 2], al
add esi, 3
sub ecx, 1
add ebp, 4
test ecx, ecx
mov dword [esp + 0x28], ecx
jg 0x40dbb0
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x10]
add esi, edx
cdq
xor eax, edx
add ecx, 1
sub eax, edx
cmp ecx, eax
mov dword [esp + 0x10], ecx
jl 0x40db90
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x7c]
push 0xcc0020
push 0
push 0
push edi
push ecx
mov ecx, dword [esp + 0x8c]
push ebx
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
mov dword [esp + 0x10], eax
mov ebx, dword [esp + 0x18]
test edi, edi
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
je 0x40dd05
mov edx, dword [esp + 0x1c]
push edx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push edi
call esi
test ebx, ebx
pop edi
je 0x40dd0d
push ebx
call esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x40dd18
push eax
call esi
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0x64
ret
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret