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

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x54]
push eax
push ecx
mov dword [esp + 0x1c], esi
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ebx, dword [esp + 0x5c]
sub ebx, dword [esp + 0x54]
movsx edx, word [esi + 0x21c]
mov edi, dword [esp + 0x60]
sub edi, dword [esp + 0x58]
add edx, edx
mov eax, ebx
sub eax, edx
dec eax
cmp eax, 1
mov dword [esp + 0x34], edi
mov dword [esp + 0x50], ebx
jge 0x40b92c
mov eax, 1
push 8
push 1
lea ecx, [esi + 0x140]
push eax
call fcn.0040b700
movsx ecx, word [esi + 0x21c]
add ecx, ecx
mov eax, edi
sub eax, ecx
cmp eax, 1
jge 0x40b953
mov eax, 1
push 8
push eax
lea ecx, [esi + 0x174]
push 1
call fcn.0040b700
push 8
push edi
lea ecx, [esi + 0x70]
push ebx
call fcn.0040b700
mov esi, dword [sym.imp.USER32.dll_GetSysColor]
push 0x14
call esi
push 0xf
mov dword [esp + 0x3c], eax
call esi
push 0x10
mov ebx, eax
call esi
mov dword [esp + 0x30], eax
movzx edx, al
shr ax, 8
mov word [esp + 0x12], ax
mov ax, bx
shr ax, 8
mov word [esp + 0x10], ax
mov eax, dword [esp + 0x30]
shr eax, 0x10
mov dword [esp + 0x3c], eax
mov eax, edx
movzx ebp, bl
xor ecx, ecx
shr ebx, 0x10
neg eax
shl edx, 7
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], ecx
mov edi, 0x80
mov dword [esp + 0x40], eax
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
add eax, edx
cdq
and edx, 0x7f
add eax, edx
movzx edx, byte [esp + 0x10]
mov ebx, eax
imul edx, ecx
movzx eax, byte [esp + 0x12]
imul eax, edi
add eax, edx
cdq
and edx, 0x7f
add eax, edx
movzx edx, byte [esp + 0x30]
sar eax, 7
imul edx, ecx
mov dword [esp + 0x18], eax
movzx eax, byte [esp + 0x3c]
imul eax, edi
add eax, edx
cdq
and edx, 0x7f
add eax, edx
mov edx, dword [esp + 0x14]
mov esi, dword [edx + 0x70]
add edx, 0x70
sar eax, 7
sar ebx, 7
mov dword [esp + 0x1c], eax
test esi, esi
je 0x40ba6f
movzx edx, word [edx + 0x30]
test dx, dx
je 0x40ba6f
movzx bp, cl
cmp bp, dx
mov ebp, dword [esp + 0x2c]
jae 0x40ba6f
movzx edx, cl
add edx, edx
add edx, edx
mov byte [edx + esi + 0x28], al
mov al, byte [esp + 0x18]
inc edx
mov byte [edx + esi + 0x28], al
mov eax, dword [esp + 0x1c]
inc edx
mov byte [edx + esi + 0x28], bl
mov byte [edx + esi + 0x29], 0
mov edx, dword [esp + 0x14]
mov esi, dword [edx + 0x140]
mov dword [esp + 0x20], esi
test esi, esi
je 0x40bac2
movzx esi, word [edx + 0x170]
test si, si
je 0x40bac2
movzx dx, cl
cmp dx, si
jae 0x40babe
mov esi, dword [esp + 0x20]
movzx edx, cl
add edx, edx
add edx, edx
mov byte [edx + esi + 0x28], al
mov al, byte [esp + 0x18]
mov byte [edx + esi + 0x29], al
inc edx
mov eax, esi
inc edx
mov byte [edx + eax + 0x28], bl
mov byte [edx + eax + 0x29], 0
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov esi, dword [edx + 0x174]
mov dword [esp + 0x20], esi
test esi, esi
je 0x40bb09
movzx edx, word [edx + 0x1a4]
test dx, dx
je 0x40bb09
movzx si, cl
cmp si, dx
jae 0x40bb09
mov esi, dword [esp + 0x20]
movzx edx, cl
add edx, edx
add edx, edx
mov byte [edx + esi + 0x28], al
mov al, byte [esp + 0x18]
inc edx
mov byte [edx + esi + 0x28], al
inc edx
mov eax, esi
mov byte [edx + eax + 0x28], bl
mov byte [edx + eax + 0x29], 0
mov edx, dword [esp + 0x40]
add dword [esp + 0x24], ebp
add dword [esp + 0x28], edx
dec edi
inc ecx
cmp edi, 0xffffffff
jg 0x40b9d6
mov eax, dword [esp + 0x38]
mov dx, ax
movzx edi, al
shr eax, 0x10
shr dx, 8
mov dword [esp + 0x40], eax
movzx eax, byte [esp + 0x30]
mov word [esp + 0x12], dx
mov edx, eax
imul eax, eax, 0x7f
neg edx
mov dword [esp + 0x4c], edx
movzx edx, byte [esp + 0x10]
mov esi, edx
imul edx, edx, 0x7f
neg esi
mov dword [esp + 0x48], esi
mov esi, ebp
neg esi
imul ebp, ebp, 0x7f
mov ecx, 1
mov dword [esp + 0x20], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ebp
mov edi, edi
mov eax, dword [esp + 0x28]
add eax, edi
cdq
and edx, 0x7f
add eax, edx
mov ebx, eax
movzx eax, byte [esp + 0x12]
imul eax, ecx
add eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x14]
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
mov dword [esp + 0x18], eax
movzx eax, byte [esp + 0x40]
imul eax, ecx
add eax, dword [esp + 0x2c]
sar ebx, 7
cdq
and edx, 0x7f
add eax, edx
mov edx, dword [ebp + 0x70]
sar eax, 7
mov dword [esp + 0x1c], eax
mov al, cl
add al, 0x7f
mov byte [esp + 0x10], al
test edx, edx
je 0x40bc1b
movzx esi, word [ebp + 0xa0]
test si, si
je 0x40bc1b
movzx bp, al
cmp bp, si
mov ebp, dword [esp + 0x14]
jae 0x40bc1b
movzx ecx, al
movzx eax, byte [esp + 0x1c]
add ecx, ecx
add ecx, ecx
mov byte [ecx + edx + 0x28], al
movzx eax, byte [esp + 0x18]
inc ecx
mov byte [ecx + edx + 0x28], al
mov al, byte [esp + 0x10]
inc ecx
mov byte [ecx + edx + 0x28], bl
mov byte [ecx + edx + 0x29], 0
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp + 0x140]
mov dword [esp + 0x30], edx
test edx, edx
je 0x40bc6a
movzx edx, word [ebp + 0x170]
test dx, dx
je 0x40bc6a
movzx si, al
cmp si, dx
jae 0x40bc6a
movzx edx, byte [esp + 0x1c]
mov esi, dword [esp + 0x30]
movzx ecx, al
add ecx, ecx
add ecx, ecx
mov byte [ecx + esi + 0x28], dl
movzx edx, byte [esp + 0x18]
inc ecx
mov byte [ecx + esi + 0x28], dl
inc ecx
mov byte [ecx + esi + 0x28], bl
mov byte [ecx + esi + 0x29], 0
mov ecx, dword [esp + 0x20]
mov esi, dword [ebp + 0x174]
test esi, esi
je 0x40bcb3
movzx edx, word [ebp + 0x1a4]
test dx, dx
je 0x40bcb3
movzx bp, al
cmp bp, dx
mov ebp, dword [esp + 0x14]
jae 0x40bcb3
mov dl, byte [esp + 0x18]
movzx ecx, al
mov al, byte [esp + 0x1c]
add ecx, ecx
add ecx, ecx
mov byte [ecx + esi + 0x28], al
inc ecx
mov byte [ecx + esi + 0x28], dl
inc ecx
mov byte [ecx + esi + 0x28], bl
mov byte [ecx + esi + 0x29], 0
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x44]
add dword [esp + 0x28], eax
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
add edi, dword [esp + 0x3c]
add dword [esp + 0x24], edx
add dword [esp + 0x2c], eax
inc ecx
cmp ecx, 0x81
mov dword [esp + 0x20], ecx
jl 0x40bb80
movzx ecx, byte [esp + 0x74]
mov edx, dword [esp + 0x78]
push ecx
push edx
lea ecx, [ebp + 0x70]
call fcn.0040afc0
mov eax, dword [ebp + 0x140]
test eax, eax
je 0x40bd13
mov cx, word [ebp + 0x170]
add cx, cx
add cx, cx
movzx ecx, cx
add ecx, eax
add ecx, dword [eax]
jmp 0x40bd15
xor ecx, ecx
mov esi, dword [ebp + 0x148]
xor eax, eax
test esi, esi
jle 0x40bd3a
mov edx, eax
and edx, 0x80000001
jns 0x40bd30
dec edx
or edx, 0xfffffffe
inc edx
neg dl
mov byte [ecx + eax], dl
inc eax
cmp eax, esi
jl 0x40bd21
mov eax, dword [ebp + 0x174]
test eax, eax
je 0x40bd5a
mov cx, word [ebp + 0x1a4]
add cx, cx
add cx, cx
movzx ecx, cx
add ecx, eax
add ecx, dword [eax]
jmp 0x40bd5c
xor ecx, ecx
mov esi, dword [ebp + 0x180]
xor eax, eax
test esi, esi
jle 0x40bd8b
jmp 0x40bd70
mov edx, eax
and edx, 0x80000001
jns 0x40bd7f
dec edx
or edx, 0xfffffffe
inc edx
neg dl
mov byte [ecx], dl
inc eax
add ecx, 4
cmp eax, esi
jl 0x40bd70
mov eax, dword [ebp + 0x9c]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x70]
test eax, eax
je 0x40bdb2
mov cx, word [ebp + 0xa0]
add cx, cx
add cx, cx
movzx ebx, cx
add ebx, eax
add ebx, dword [eax]
jmp 0x40bdb4
xor ebx, ebx
movzx ecx, byte [esp + 0x6c]
lea eax, [ecx + ecx]
cmp eax, 1
mov esi, 1
jl 0x40bdc8
mov esi, eax
mov eax, 0x7fff
cdq
idiv esi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x40], eax
mov eax, 0xff
sub eax, ecx
mov dword [esp + 0x44], eax
test edi, edi
jle 0x40bed4
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], edi
mov eax, dword [esp + 0x74]
cdq
idiv edi
mov ebp, dword [esp + 0x50]
xor esi, esi
mov ecx, eax
sub ecx, 0x7f
test ebp, ebp
jle 0x40beb9
mov eax, ecx
imul eax, ecx
imul eax, ecx
movzx ecx, byte [esp + 0x6c]
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
mov dword [esp + 0x4c], eax
mov eax, 0x80
sub eax, ecx
mov edi, ebp
mov dword [esp + 0x48], eax
imul edi, edi, 0xff
mov eax, edi
cdq
idiv ebp
mov ecx, eax
sub ecx, 0x7f
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
cdq
movzx ecx, byte [esp + 0x6c]
and edx, 0x7f
add eax, edx
sar eax, 7
add eax, dword [esp + 0x4c]
imul eax, dword [esp + 0x48]
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
sub eax, 0xffffff80
cmp eax, ecx
jge 0x40be8b
mov eax, ecx
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jle 0x40be95
mov eax, ecx
mov byte [ebx + esi], al
call fcn.0041eba7
cdq
idiv dword [esp + 0x40]
inc esi
sub edi, 0xff
sub al, byte [esp + 0x6c]
add byte [ebx + esi - 1], al
cmp esi, ebp
jl 0x40be47
mov edi, dword [esp + 0x34]
add ebx, dword [esp + 0x3c]
add dword [esp + 0x74], 0xff
sub dword [esp + 0x78], 1
jne 0x40bdf7
mov ebp, dword [esp + 0x14]
movzx edx, word [ebp + 0x82]
mov eax, dword [ebp + 0x7c]
mov ecx, dword [ebp + 0x78]
push edx
push eax
lea esi, [ebp + 0xd8]
push ecx
mov ecx, esi
call fcn.0040b700
mov eax, dword [esi]
test eax, eax
je 0x40bf18
mov dx, word [esi + 0x30]
add dx, dx
add dx, dx
movzx ecx, dx
add ecx, dword [esi + 0x18]
mov edx, dword [ebp + 0x70]
add ecx, dword [esi + 4]
push ecx
push edx
push eax
call fcn.0041e0a0
add esp, 0xc
movzx eax, word [ebp + 0x82]
mov ecx, dword [ebp + 0x7c]
mov edx, dword [ebp + 0x78]
push eax
push ecx
lea esi, [ebp + 0x10c]
push edx
mov ecx, esi
call fcn.0040b700
mov eax, dword [esi]
test eax, eax
je 0x40bf5c
mov cx, word [esi + 0x30]
add cx, cx
add cx, cx
movzx edx, cx
add edx, dword [esi + 0x18]
mov ecx, dword [ebp + 0x70]
add edx, dword [esi + 4]
push edx
push ecx
push eax
call fcn.0041e0a0
add esp, 0xc
movzx edx, byte [esp + 0x70]
mov eax, dword [esp + 0x38]
push edx
push eax
mov ecx, esi
call fcn.0040afc0
movzx ecx, word [esi + 0x12]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ecx
push edx
lea edi, [ebp + 0xa4]
push eax
mov ecx, edi
call fcn.0040b700
mov eax, dword [edi]
test eax, eax
je 0x40bfae
mov cx, word [edi + 0x30]
add cx, cx
add cx, cx
movzx edx, cx
add edx, dword [edi + 0x18]
mov ecx, dword [esi]
add edx, dword [edi + 4]
push edx
push ecx
push eax
call fcn.0041e0a0
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0x14