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

Disassembly:
sub esp, 0x98
push ebx
push ebp
mov ebp, dword [esp + 0xa4]
push esi
push edi
mov edi, eax
mov eax, dword [ebp + 0x54]
mov eax, dword [eax + 0xe0c0]
test eax, eax
je 0x411f54
cmp dword [ebp + 0x50], eax
je 0x411f54
mov eax, ebp
call fcn.00411b00
test eax, eax
je 0x412612
mov ecx, dword [edi]
mov edx, dword [edi + 8]
xor eax, eax
mov dword [esp + 0x98], edx
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov eax, dword [edi + 4]
xor edx, edx
mov dword [esp + 0x90], ecx
mov ecx, dword [ebp + 0x18]
div ecx
mov ebx, dword [edi + 0xc]
xor edx, edx
movzx esi, byte [ebp + 0x30]
shr esi, 3
mov dword [esp + 0x88], esi
mov edi, eax
mov eax, ebx
div ecx
xor edx, edx
mov ebx, eax
mov eax, dword [esp + 0x90]
div ecx
xor edx, edx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x98]
div ecx
mov ecx, eax
mov dword [esp + 0x58], ecx
cmp esi, 4
jae 0x411fe6
mov eax, dword [esp + 0x50]
mov edx, eax
cmp esi, 1
jne 0x411fdd
and edx, 3
jmp 0x411fe0
and edx, 1
sub eax, edx
mov dword [esp + 0x50], eax
sub ecx, dword [esp + 0x50]
mov eax, dword [ebp + 0x1c]
cmp ecx, 0x10
mov byte [esp + 0x16], 0
jge 0x412006
mov dword [esp + 0x34], 8
mov byte [esp + 0x16], 1
jmp 0x412019
xor edx, edx
cmp ecx, 0x20
setge dl
dec edx
and edx, 0xffffffd0
add edx, 0x40
mov dword [esp + 0x34], edx
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x50]
imul ecx, edi
imul edx, esi
add ecx, edx
cmp dword [ebp + 8], 0
je 0x412391
mov edx, dword [ebp + 0x54]
cmp byte [edx + 0xa4], 0
jne 0x412391
mov esi, dword [ebp + 0x4c]
test esi, esi
je 0x412391
mov edx, dword [ebp + 0x44]
add edx, ecx
add esi, ecx
add ecx, eax
cmp edi, ebx
mov dword [esp + 0x38], edx
mov dword [esp + 0x44], esi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], edi
jge 0x412612
jmp 0x412078
mov ebx, dword [esp + 0x5c]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x50]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x18]
add ecx, edx
cmp ecx, ebx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x1c], ecx
jl 0x4120aa
mov dword [esp + 0x1c], ebx
cmp eax, dword [esp + 0x58]
mov dword [esp + 0x30], eax
jge 0x41235e
jmp 0x4120c0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x6c]
mov dword [esp + 0x60], eax
lea eax, [ecx + edx]
mov edx, dword [esp + 0x58]
cmp eax, edx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x70], eax
jge 0x4120f5
mov dword [esp + 0x2c], eax
jmp 0x4120fb
mov eax, edx
mov dword [esp + 0x2c], edx
mov ebx, eax
sub ebx, ecx
imul ebx, dword [esp + 0x88]
mov ecx, dword [ebp + 0x20]
xor edx, edx
mov eax, ebx
div ecx
mov byte [esp + 0x17], 1
mov dword [esp + 0x40], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x1c]
jae 0x412340
mov edi, edi
mov ecx, dword [esp + 0x8c]
mov eax, dword [ebp + 0x24]
mov edx, dword [esp + 0x48]
imul eax, ecx
lea esi, [eax + edx]
mov edx, dword [esp + 0x4c]
lea edi, [eax + edx]
cmp ecx, 4
jb 0x412174
mov eax, dword [edi]
cmp eax, dword [esi]
jne 0x4121ca
sub ecx, 4
add esi, 4
add edi, 4
cmp ecx, 4
jae 0x412160
test ecx, ecx
je 0x412198
mov dl, byte [esi]
cmp dl, byte [edi]
jne 0x4121ca
cmp ecx, 1
jbe 0x412198
mov al, byte [esi + 1]
cmp al, byte [edi + 1]
jne 0x4121ca
cmp ecx, 2
jbe 0x412198
mov cl, byte [esi + 2]
cmp cl, byte [edi + 2]
jne 0x4121ca
mov eax, dword [ebp + 4]
add dword [esp + 0x4c], eax
add dword [esp + 0x48], eax
add dword [esp + 0x60], eax
mov eax, dword [ebp + 0x24]
inc eax
cdq
idiv dword [ebp + 0x20]
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
mov dword [ebp + 0x24], edx
cmp eax, dword [esp + 0x1c]
jb 0x412140
jmp 0x412340
cmp byte [esp + 0x16], 0
mov ecx, dword [ebp + 0x18]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
je 0x412203
mov edx, ecx
imul edx, esi
mov eax, esi
sub eax, edi
imul eax, dword [ebp + 4]
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x28]
add edx, eax
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x6c]
add eax, edx
mov dword [esp + 0x40], eax
jmp 0x41220c
mov eax, ecx
imul eax, edi
mov dword [esp + 0x7c], eax
mov eax, ecx
imul eax, dword [esp + 0x2c]
mov edx, ecx
imul edx, dword [esp + 0x30]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x1c]
imul ecx, eax
cmp byte [esp + 0x16], 0
mov dword [esp + 0x78], edx
mov dword [esp + 0x84], ecx
jne 0x41223c
mov esi, edi
cmp esi, eax
jae 0x4122e4
sub eax, esi
mov dword [esp + 0x2c], eax
cmp byte [esp + 0x17], 0
je 0x41229d
mov esi, dword [esp + 0x68]
mov edi, dword [esp + 0x64]
mov eax, ebx
cmp ebx, 4
jb 0x412274
mov ecx, dword [edi]
cmp ecx, dword [esi]
jne 0x412298
sub eax, 4
add esi, 4
add edi, 4
cmp eax, 4
jae 0x412260
test eax, eax
je 0x41229d
mov dl, byte [esi]
cmp dl, byte [edi]
jne 0x412298
cmp eax, 1
jbe 0x41229d
mov cl, byte [esi + 1]
cmp cl, byte [edi + 1]
jne 0x412298
cmp eax, 2
jbe 0x41229d
mov dl, byte [esi + 2]
cmp dl, byte [edi + 2]
je 0x41229d
mov byte [esp + 0x17], 0
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x68]
push ebx
push esi
push eax
call fcn.00485490
mov edi, dword [esp + 0x70]
add esp, 0xc
push ebx
push edi
push esi
call fcn.00485490
mov eax, dword [ebp + 4]
add dword [esp + 0x74], eax
add edi, eax
add esi, eax
add esp, 0xc
sub dword [esp + 0x2c], 1
mov dword [esp + 0x64], edi
mov dword [esp + 0x40], esi
jne 0x41224a
cmp byte [esp + 0x17], 0
je 0x41230e
lea esi, [esp + 0x78]
lea edi, [esp + 0x90]
call fcn.00409590
mov edx, dword [eax]
mov ecx, dword [esp + 0xb4]
mov ecx, dword [ecx]
push 2
push edx
push ecx
push ecx
call dword [sym.imp.GDI32.dll_CombineRgn]
mov esi, edi
jmp 0x41233b
lea esi, [esp + 0x78]
lea edi, [esp + 0xa0]
call fcn.00409590
mov ecx, dword [esp + 0xa0]
mov eax, dword [esp + 0xb0]
mov eax, dword [eax]
push 2
push ecx
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
mov esi, edi
call fcn.004095c0
mov eax, dword [esp + 0x70]
add dword [esp + 0x6c], ebx
add dword [esp + 0x28], ebx
add dword [esp + 0x20], ebx
cmp eax, dword [esp + 0x58]
mov dword [esp + 0x30], eax
jl 0x4120c0
mov eax, dword [ebp + 4]
imul eax, dword [esp + 0x34]
add dword [esp + 0x38], eax
add dword [esp + 0x3c], eax
add dword [esp + 0x44], eax
mov eax, dword [esp + 0x74]
cmp eax, dword [esp + 0x5c]
mov dword [esp + 0x18], eax
jl 0x412070
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret 0xc
mov edx, dword [ebp + 0x44]
add edx, ecx
add ecx, eax
cmp edi, ebx
mov dword [esp + 0x38], edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x18], edi
jge 0x412612
jmp 0x4123b4
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x5c]
mov esi, dword [esp + 0x50]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x18]
add eax, edx
cmp eax, ecx
mov dword [esp + 0x74], eax
mov dword [esp + 0x1c], eax
jl 0x4123e2
mov dword [esp + 0x1c], ecx
cmp esi, dword [esp + 0x58]
mov dword [esp + 0x30], esi
jge 0x4125e5
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
add eax, ecx
cmp eax, edi
mov dword [esp + 0x44], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x70], eax
jge 0x41241c
mov dword [esp + 0x2c], eax
jmp 0x412422
mov eax, edi
mov dword [esp + 0x2c], edi
sub eax, ecx
imul eax, dword [esp + 0x88]
mov ecx, dword [ebp + 0x20]
mov dword [esp + 0x48], edx
xor edx, edx
mov dword [esp + 0x4c], eax
div ecx
mov dword [esp + 0x60], esi
mov edi, eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x1c]
jae 0x4125bc
mov ebx, dword [ebp + 0x24]
mov ecx, dword [esp + 0x3c]
mov eax, ebx
imul eax, edi
lea esi, [eax + ecx]
mov ecx, dword [esp + 0x44]
add eax, ecx
mov edx, edi
cmp edi, 4
jb 0x412484
nop
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x4124de
sub edx, 4
add esi, 4
add eax, 4
cmp edx, 4
jae 0x412470
test edx, edx
je 0x4124a8
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x4124de
cmp edx, 1
jbe 0x4124a8
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x4124de
cmp edx, 2
jbe 0x4124a8
mov dl, byte [esi + 2]
cmp dl, byte [eax + 2]
jne 0x4124de
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
lea eax, [esi - 1]
cmp ecx, eax
je 0x4124cc
mov eax, dword [ebp + 4]
add dword [esp + 0x44], eax
add dword [esp + 0x3c], eax
lea eax, [ebx + 1]
cdq
idiv dword [ebp + 0x20]
mov dword [ebp + 0x24], edx
inc ecx
mov dword [esp + 0x24], ecx
cmp ecx, esi
jb 0x412453
jmp 0x4125bc
cmp byte [esp + 0x16], 0
mov eax, dword [ebp + 0x18]
mov edi, eax
je 0x41250f
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
imul edi, ecx
sub ecx, dword [esp + 0x18]
imul ecx, dword [ebp + 4]
add edx, ecx
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x20]
add ecx, edx
mov dword [esp + 0x48], ecx
jmp 0x412514
imul edi, dword [esp + 0x18]
mov esi, eax
imul esi, dword [esp + 0x30]
mov ebx, eax
imul eax, dword [esp + 0x1c]
imul ebx, dword [esp + 0x2c]
push 0x4a3fbe
mov dword [esp + 0x88], eax
call fcn.0047d6d1
add esp, 4
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x84]
push eax
push ebx
push edi
push esi
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov ecx, dword [esp + 0xb0]
push 2
mov esi, eax
mov eax, dword [ecx]
push esi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esp + 0x94]
push edx
call fcn.0047d643
mov eax, dword [esp + 0x28]
add esp, 4
cmp byte [esp + 0x16], 0
jne 0x41258f
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
cmp eax, ebx
jae 0x4125bc
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x48]
sub ebx, eax
mov eax, dword [esp + 0x4c]
push eax
push esi
push edi
call fcn.00485490
mov eax, dword [ebp + 4]
add esp, 0xc
add esi, eax
add edi, eax
sub ebx, 1
jne 0x4125a1
mov ecx, dword [esp + 0x58]
lea eax, [ecx - 1]
cmp dword [esp + 0x30], eax
je 0x4125d5
mov eax, dword [esp + 0x4c]
add dword [esp + 0x20], eax
add dword [esp + 0x28], eax
mov eax, dword [esp + 0x70]
cmp eax, ecx
mov dword [esp + 0x30], eax
jl 0x4123f0
mov ecx, dword [esp + 0x5c]
lea eax, [ecx - 1]
cmp dword [esp + 0x18], eax
je 0x412602
mov eax, dword [ebp + 4]
imul eax, dword [esp + 0x34]
add dword [esp + 0x38], eax
add dword [esp + 0x40], eax
mov eax, dword [esp + 0x74]
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x4123b0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98
ret 0xc