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

Disassembly:
push 0xffffffffffffffff
push 0x427b13
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
mov eax, dword [0x435100]
push ebx
push ebp
push esi
mov esi, ecx
mov dword [esp + 0xb0], eax
mov dword [esp + 0xc], esi
mov ecx, dword [esi + 0x1c]
lea eax, [esp + 0x70]
push eax
xor ebx, ebx
push ecx
mov dword [esp + 0xc4], ebx
call dword [sym.imp.USER32.dll_BeginPaint]
push eax
call fcn.00421f8d
mov ebp, eax
cmp ebp, ebx
mov dword [esp + 0x14], ebp
je 0x4032d2
push edi
xor eax, eax
mov ecx, 0xb
lea edi, [esp + 0x40]
lea edx, [esp + 0x30]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x1c]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
sub ecx, edx
mov edx, dword [esp + 0x3c]
push ebx
sub edx, eax
push ebx
lea eax, [esp + 0x78]
push eax
mov dword [esp + 0x50], ecx
push ebx
lea ecx, [esp + 0x50]
mov dword [esp + 0x58], edx
mov edx, dword [ebp + 4]
push ecx
push edx
mov dword [esp + 0x58], 0x28
mov word [esp + 0x64], 1
mov word [esp + 0x66], 0x18
mov dword [esp + 0x68], ebx
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebx, eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], ebx
call fcn.00421c03
mov eax, dword [ebp + 4]
push eax
mov byte [esp + 0xc4], 1
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x24]
call fcn.00421f9b
test ebx, ebx
je 0x403121
mov eax, dword [esp + 0x24]
push ebx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esi + 0x80]
mov edx, dword [esi + 0x7c]
push eax
lea ecx, [esi + 0x70]
push edx
push 0
push 0
push eax
push edx
mov edx, dword [esp + 0x3c]
push 0
push 0
push edx
call fcn.00401aa0
xor edi, edi
mov dword [esp + 0x14], edi
lea esp, [esp]
mov al, byte [esi + edi + 0xd4]
cmp al, 0xff
je 0x403262
test al, al
je 0x403262
cmp al, 0x42
mov dl, al
jne 0x403171
mov al, 0x81
jmp 0x4031ab
cmp al, 0x41
jne 0x403179
mov al, 0x12
jmp 0x4031ab
mov cl, al
and cl, 0xf0
jne 0x403184
mov al, 0x40
jmp 0x40319d
cmp cl, 0x10
jne 0x40318d
mov al, 0x20
jmp 0x40319d
cmp cl, 0x20
jne 0x403196
mov al, 8
jmp 0x40319d
cmp cl, 0x30
jne 0x40319d
mov al, 4
and dl, 0xf
cmp dl, 5
jbe 0x4031a9
or al, 1
jmp 0x4031ab
or al, 2
mov cl, al
not cl
movzx ebp, cl
and ebp, 1
xor ebx, ebx
test al, 4
je 0x4031bb
test al, 8
je 0x4031c4
mov ebx, 1
test al, 0x20
je 0x4031cd
mov ebx, 3
test al, 0x40
je 0x4031d6
mov ebx, 4
test al, al
jns 0x4031e1
xor ebp, ebp
mov ebx, 2
test al, 0x10
je 0x4031ef
mov ebp, 1
mov ebx, 2
mov ecx, dword [esi + 0xac]
mov eax, 0x66666667
imul ecx
mov eax, dword [esi + 0xb0]
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cdq
sub eax, edx
mov esi, eax
mov eax, edi
xor edx, edx
mov edi, 0xf
div edi
lea edi, [ecx + 3]
sar esi, 1
push esi
push ecx
imul edi, edx
imul eax, eax, 0x29
mov edx, esi
imul edx, ebp
push edx
mov edx, ecx
imul edx, ebx
push edx
push esi
push ecx
mov ecx, dword [esp + 0x28]
add eax, 0xb
push eax
mov eax, dword [esp + 0x40]
add edi, 0xa
push edi
push eax
add ecx, 0xa0
call fcn.00401aa0
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
inc edi
cmp edi, 0x1e
mov dword [esp + 0x14], edi
jl 0x403150
mov ecx, dword [ebp + 4]
mov edx, dword [esi + 0x1c]
push ecx
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [esp + 0x20]
mov byte [esp + 0xc0], 0
call fcn.00422003
test ebx, ebx
pop edi
je 0x4032d2
lea ecx, [esp + 0x3c]
call fcn.00401550
push 0
lea ecx, [esp + 0x40]
mov dword [esp + 0x44], ebx
call fcn.004016c0
mov eax, dword [esp + 0xc4]
push 0x42d99c
push eax
lea ecx, [esp + 0x44]
call fcn.00402d70
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
lea ecx, [esp + 0x3c]
call fcn.00401e50
mov edx, dword [esi + 0x1c]
lea ecx, [esp + 0x70]
push ecx
push edx
call dword [sym.imp.USER32.dll_EndPaint]
mov eax, dword [esp + 0xc4]
add eax, 0xfffffff0
mov dword [esp + 0xbc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop esi
pop ebp
pop ebx
jg 0x403310
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0xa8]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xa4]
mov eax, 1
call fcn.0040dd5e
add esp, 0xb4
ret 4