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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xec
mov eax, dword [esp + 0x100]
mov edx, dword [esp + 0x114]
mov ecx, dword [esp + 0x11c]
mov ebp, dword [eax + 4]
xor eax, eax
mov ebx, dword [esp + 0x100]
cmp dword [ebp + 0x1c], 2
sete al
lea eax, [eax + eax*2]
add edx, eax
add eax, eax
sub ecx, eax
mov dword [esp + 0x6c], edx
mov eax, dword [esp + 0x120]
or eax, dword [ebx + 0x14]
mov dword [esp + 0x68], ecx
jne 0x51a2b0
mov edx, dword [ebx + 0x90]
test edx, edx
mov dword [esp + 0x78], edx
jne 0x51a325
mov ecx, dword [ebp + 0x58]
mov dword [esp + 0x78], ecx
mov edx, dword [esp + 0x100]
mov edx, dword [edx + 0x98]
test edx, edx
mov dword [esp + 0x74], edx
jne 0x51a33e
mov ecx, dword [ebp + 0x5c]
mov dword [esp + 0x74], ecx
jmp 0x51a33e
mov eax, dword [ebp + 0xa0]
mov ebx, dword [eax + 8]
jmp 0x51a2f7
xor edi, edi
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x70]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0xac]
mov edx, dword [ebp]
mov edx, dword [edx + 0x2c]
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x51ad8c
mov ebx, dword [ebx + 0xa8]
test ebx, ebx
jne 0x51a2c0
mov eax, dword [esp + 0x100]
cmp dword [eax + 0x14], 2
je 0x51aa94
mov ebx, dword [esp + 0x100]
mov ebx, dword [ebx + 0x8c]
test ebx, ebx
mov dword [esp + 0x78], ebx
je 0x51add5
mov edx, dword [esp + 0x100]
mov edx, dword [edx + 0x98]
test edx, edx
mov dword [esp + 0x74], edx
je 0x51a2a1
mov ebx, dword [esp + 0x100]
mov eax, dword [ebx + 0x40]
test eax, eax
jne 0x51a34f
mov eax, dword [ebp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.00511180
mov ebx, dword [esp + 0x120]
mov esi, eax
mov edi, eax
test ebx, ebx
jne 0x51a38f
mov edx, dword [esp + 0x100]
mov eax, dword [edx + 0x48]
test eax, eax
jne 0x51a37e
mov eax, dword [ebp + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.00511180
mov edi, eax
mov ecx, dword [esp + 0x100]
mov ebx, dword [esp + 0x10c]
mov eax, dword [ecx + 0x54]
mov dword [esp + 0x70], ebx
test eax, eax
jne 0x51a580
mov edx, dword [esp + 0x100]
mov eax, esi
mov ecx, dword [edx + 0x14]
test ecx, ecx
je 0x51a460
test byte [edx + 0x9f], 0x40
jne 0x51a460
lea esi, [esi]
mov dword [esp + 8], eax
mov ecx, dword [esp + 0x11c]
xor edx, edx
mov dword [esp + 0x20], edx
mov ebx, dword [esp + 0x118]
xor edi, edi
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x114]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x110]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x104]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], ebx
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.00511760
mov edx, dword [esp + 0x100]
mov eax, dword [edx]
cmp eax, 4
je 0x51aac4
cmp eax, 5
jne 0x51a467
mov esi, dword [ebp + 0x1c]
test esi, esi
je 0x51acc0
lea esi, [esi]
lea edi, [edi]
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, edi
jmp 0x51a3d0
xor eax, eax
mov ecx, dword [esp + 0x100]
xor edi, edi
mov dword [esp + 0x58], eax
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x54], eax
xor eax, eax
mov esi, dword [ecx + 0x60]
mov dword [esp + 0x50], eax
xor eax, eax
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x8c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x30]
mov dword [esp + 8], eax
mov eax, dword [ebp]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004b1370
mov eax, dword [esp + 0x110]
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x100]
add eax, esi
add eax, edx
mov edx, dword [ecx + 0x28]
mov dword [esp + 0x64], eax
test edx, edx
jne 0x51ab8c
mov edx, dword [esp + 0x100]
mov eax, dword [edx + 0x20]
test eax, eax
jne 0x51ad9c
mov eax, dword [esp + 0x100]
mov ecx, dword [eax + 0x10]
test ecx, ecx
jle 0x51a545
xor edx, edx
mov dword [esp + 4], edx
mov eax, dword [eax + 0xc]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0xac]
mov ecx, dword [esp + 0x100]
mov ebx, dword [esp + 0x108]
mov edx, dword [ecx + 0x10]
mov dword [esp], ebx
mov ebx, 1
mov dword [esp + 8], edx
mov dword [esp + 4], eax
call fcn.004bf2d0
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x70]
mov eax, dword [eax + 8]
mov dword [esp + 0x60], eax
test edi, edi
setne al
xor edx, edx
test ebx, ebx
setne dl
test edx, eax
je 0x51a5b2
mov ebx, dword [esp + 0x84]
mov ecx, dword [esp + 0x5c]
cmp ecx, ebx
jl 0x51aa8d
mov edx, dword [esp + 0x100]
mov eax, dword [edx + 0x68]
cmp eax, 5
ja case.0x51a577.3
jmp dword [eax*4 + 0x5dcee0]
mov dword [esp + 4], eax
lea ebx, [esp + 0xd0]
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.004bebc0
mov dword [esp + 0x108], eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004bede0
mov dword [esp + 0x70], ebx
jmp 0x51a3ac
xor eax, eax
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x58], ebx
xor ecx, ecx
mov dword [esp + 0x54], ecx
mov eax, dword [esp + 0x100]
mov ebx, dword [eax + 0x28]
test ebx, ebx
je 0x51a9e4
mov esi, dword [eax + 0x30]
test esi, esi
je 0x51a5f0
test byte [eax + 0x9c], 1
jne 0x51af29
mov edx, dword [esp + 0x100]
mov ecx, dword [esp + 0x88]
mov esi, dword [esp + 0x54]
mov eax, dword [edx + 0x84]
mov dword [esp + 0x10], ecx
mov dword [esp], ebx
sub eax, ecx
mov edx, eax
shr edx, 0x1f
xor ecx, ecx
add eax, edx
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x6c]
sar eax, 1
add eax, edx
add eax, esi
mov edx, dword [esp + 0x58]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x64]
xor esi, esi
mov dword [esp + 8], esi
add eax, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x104]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0xc], eax
call fcn.004c2f10
mov ecx, dword [esp + 0x100]
cmp dword [ecx + 0x68], 3
setne al
test edi, edi
sete dl
or eax, edx
test al, 1
je 0x51a810
mov edi, dword [ecx + 0x10]
test edi, edi
jle 0x51a810
mov ebx, dword [esp + 0x70]
mov eax, dword [esp + 0x68]
mov esi, dword [ebx]
mov edx, dword [ebx + 4]
add eax, esi
sub eax, edx
mov edx, eax
shr edx, 0x1f
add eax, edx
mov edx, dword [esp + 0x6c]
sar eax, 1
lea edi, [eax + edx]
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ecx + 0xc]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0xac]
mov dword [esp + 0x48], eax
call fcn.004d3110
mov ecx, dword [esp + 0x4c]
dec eax
mov ebx, dword [esp + 0x64]
mov edx, dword [esp + 0x50]
lea ecx, [edi + ecx]
mov dword [esp + 0x3c], ecx
lea esi, [ebx + edx]
je 0x51af92
mov dword [esp + 0x18], esi
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x100]
mov edx, dword [esp + 0x108]
mov dword [esp + 0x1c], ecx
mov eax, dword [ebx + 0x10]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0xc], edx
mov ebx, dword [esp + 0x104]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.00514fd0
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x6c]
mov edi, dword [esp + 0x110]
mov ecx, dword [esp + 0x50]
add eax, edx
mov edx, dword [esp + 0x100]
mov dword [esp + 0x44], eax
add edi, ecx
mov esi, dword [edx + 0x18]
test esi, esi
js 0x51a810
xor ebx, ebx
mov dword [esp + 4], ebx
mov eax, dword [edx + 0xc]
mov dword [esp], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0xac]
mov ecx, dword [esp + 0x100]
mov esi, eax
mov eax, dword [ecx + 0x18]
mov dword [esp], esi
mov dword [esp + 4], eax
mov eax, dword [0x5ecbec]
call dword [eax + 0x51c]
mov dword [esp], eax
mov ebx, eax
mov eax, dword [0x5ecbec]
sub ebx, esi
call dword [eax + 0x530]
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x70]
sub eax, esi
mov dword [esp + 0x20], eax
mov ecx, dword [ebx]
mov eax, dword [esp + 0x68]
mov edx, dword [ebx + 4]
mov ebx, dword [esp + 0x104]
add eax, ecx
sub eax, edx
mov ecx, dword [esp + 0x44]
mov edx, eax
shr edx, 0x1f
add eax, edx
sar eax, 1
add eax, ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x100]
mov edx, dword [eax + 0x60]
mov dword [esp + 0x10], esi
mov dword [esp + 8], ecx
add edi, edx
mov edx, dword [esp + 0x108]
mov dword [esp + 0x14], edi
mov dword [esp + 4], ebx
mov dword [esp + 0xc], edx
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.004bf320
nop
lea esi, [esi]
mov eax, dword [esp + 0x100]
cmp dword [eax + 0x14], 2
je 0x51ac11
mov eax, dword [esp + 0x100]
mov ebx, dword [esp + 0x110]
mov ecx, dword [eax + 0x60]
mov edx, dword [eax + 0x64]
mov eax, dword [eax + 0x34]
add ebx, ecx
add ebx, edx
test eax, eax
jne 0x51ab6f
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x68]
mov esi, dword [ecx]
mov edx, dword [ecx + 4]
add eax, esi
sub eax, edx
mov edx, eax
shr edx, 0x1f
add eax, edx
mov edx, dword [esp + 0x6c]
sar eax, 1
lea esi, [eax + edx]
call fcn.004d3110
dec eax
je 0x51aca0
mov ecx, dword [esp + 0x100]
mov edx, dword [ecx + 0x34]
test edx, edx
jne 0x51abc5
mov ebx, dword [esp + 0x124]
test ebx, ebx
je 0x51a8b0
mov eax, dword [esp + 0x100]
mov ecx, dword [eax]
test ecx, ecx
jne 0x51a8b0
cmp dword [eax + 0x14], 2
je 0x51b0d0
lea esi, [esi]
lea edi, [edi]
mov ebx, dword [esp + 0x100]
mov eax, dword [ebx + 0x5c]
test eax, eax
jne 0x51a450
mov eax, dword [ebx]
cmp eax, 1
sete dl
cmp eax, 3
sete al
or eax, edx
test al, 1
je 0x51a450
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x51a450
test byte [ebx + 0x9c], 1
je 0x51a450
cmp dword [ebx + 0x14], 1
mov esi, dword [esp + 0x78]
je 0x51b26f
mov edx, dword [esp + 0x100]
mov eax, dword [esp + 0x6c]
mov edx, dword [edx + 0x84]
mov dword [esp + 0xb4], eax
add eax, edx
mov dword [esp + 0xbc], eax
lea eax, [esp + 0x80]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 8], eax
mov eax, dword [ebp]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004b1370
lea eax, [esp + 0x7c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x30]
mov dword [esp + 8], eax
mov eax, dword [ebp]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004b1370
mov eax, dword [esp + 0x7c]
mov edi, dword [esp + 0x80]
mov ebx, dword [esp + 0x110]
mov ecx, dword [esp + 0x100]
add eax, edi
add eax, ebx
mov dword [esp + 0xb0], eax
mov ecx, dword [ecx + 0x60]
mov eax, dword [esp + 0x100]
add dword [esp + 0x110], ecx
mov ebx, dword [esp + 0x110]
cmp dword [eax + 0x14], 2
mov dword [esp + 0xb8], ebx
je 0x51b1df
mov edx, 0x7ff8
mov eax, dword [ebp + 4]
xor ecx, ecx
mov dword [esp + 8], edx
lea edx, [esp + 0xb0]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x104]
mov dword [esp + 0xc], ecx
mov dword [esp], esi
call fcn.005193e0
jmp 0x51a450
mov edx, dword [esp + 0x100]
mov eax, dword [edx + 0x20]
test eax, eax
je 0x51a65b
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.005130b0
mov ecx, dword [esp + 0x100]
mov edx, 1
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x28], edx
mov esi, dword [esp + 0x6c]
mov edx, dword [ecx + 0x84]
mov dword [esp + 0x1c], ebx
mov dword [esp + 4], eax
sub edx, ebx
mov ecx, edx
shr ecx, 0x1f
mov ebx, dword [esp + 0x78]
add edx, ecx
mov ecx, dword [esp + 0x54]
sar edx, 1
add edx, esi
mov dword [esp + 0xc], ebx
mov esi, dword [esp + 0x58]
add edx, ecx
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x64]
xor ecx, ecx
mov dword [esp + 0x14], ecx
add edx, esi
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x84]
mov dword [esp + 0x18], edx
xor edx, edx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x104]
mov dword [esp + 8], edx
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.005052f0
jmp 0x51a65b
mov ecx, ebx
jmp 0x51a568
mov esi, dword [ebp + 0x40]
test esi, esi
je 0x51a30c
mov edx, dword [esp + 0x100]
mov edx, dword [edx + 0x94]
test edx, edx
mov dword [esp + 0x78], edx
jne 0x51a325
mov ecx, dword [ebp + 0x54]
mov dword [esp + 0x78], ecx
jmp 0x51a288
mov eax, dword [esp + 0x68]
mov edi, 2
mov esi, dword [esp + 0x68]
mov ebx, dword [esp + 0x6c]
shr eax, 0x1f
mov ecx, dword [esp + 0x110]
add eax, esi
sar eax, 1
add eax, ebx
mov word [esp + 0x9a], ax
mov ebx, dword [esp + 0x110]
mov word [esp + 0x9e], ax
mov eax, dword [ebp + 0x24]
mov word [esp + 0x98], cx
mov ecx, dword [esp + 0x118]
mov dword [esp + 4], eax
mov eax, dword [ebp]
lea edx, [ebx + ecx - 1]
mov word [esp + 0x9c], dx
mov dword [esp], eax
call fcn.00511180
mov dword [esp + 8], eax
mov ebx, dword [esp + 0x104]
mov edx, 1
mov dword [esp + 0x14], edx
mov ecx, 2
lea edx, [esp + 0x98]
mov dword [esp + 0x10], edi
mov dword [esp + 4], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], edx
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.005119f0
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], eax
mov eax, dword [0x5ecbec]
xor edi, edi
mov dword [esp + 4], edi
call dword [eax + 0xac]
mov dword [esp + 0x40], eax
jmp 0x51a844
mov dword [esp], edx
lea eax, [esp + 0x88]
mov dword [esp + 8], eax
lea eax, [esp + 0x84]
mov dword [esp + 4], eax
call fcn.004c3270
mov ecx, dword [esp + 0x100]
mov edi, 1
cmp dword [ecx + 0x68], 3
jne 0x51a4eb
jmp 0x51a545
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x100]
mov edx, dword [esp + 0x108]
mov dword [esp + 0x1c], esi
mov ecx, dword [esp + 0x78]
mov eax, dword [ebx + 0x38]
mov dword [esp + 0xc], edx
mov ebx, dword [esp + 0x104]
mov dword [esp + 8], ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.00514fd0
jmp 0x51a883
mov eax, dword [ebp + 0x40]
test eax, eax
je 0x51b040
mov ecx, dword [esp + 0x100]
mov eax, dword [ecx + 0x28]
test eax, eax
je 0x51a821
mov eax, dword [ebp + 0x60]
test eax, eax
je 0x51a821
mov edx, dword [esp + 0x88]
mov eax, dword [esp + 0x84]
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x18], edx
mov esi, dword [esp + 0x54]
mov ebx, dword [esp + 0x58]
mov dword [esp + 0x14], eax
mov eax, dword [ecx + 0x84]
sub eax, edx
mov edx, eax
shr edx, 0x1f
add eax, edx
sar eax, 1
add eax, edi
add eax, esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
add eax, ebx
mov dword [esp + 0xc], eax
mov ebx, dword [esp + 0x104]
mov eax, dword [ebp + 0x60]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.00517480
jmp 0x51a821
mov ecx, dword [esp + 0x100]
cmp dword [ecx + 0x14], 2
je 0x51b07d
mov eax, dword [esp + 0x100]
mov edx, dword [eax + 0x34]
jmp 0x51a87b
mov eax, dword [esp + 0x110]
lea esi, [esp + 0x90]
mov ebx, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov word [esp + 0x90], ax
mov eax, dword [esp + 0x68]
shr eax, 0x1f
add eax, ebx
sar eax, 1
mov ebx, dword [esp + 0x118]
add eax, ecx
mov word [esp + 0x92], ax
dec ebx
mov word [esp + 0x96], ax
mov eax, dword [ebp + 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.00511180
mov edx, dword [esp + 0x90]
mov edi, eax
jmp 0x51ad71
mov word [esi + 4], bx
mov dword [esp + 0xc], esi
mov edx, 2
mov eax, 1
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x104]
mov dword [esp + 0x14], eax
mov eax, 2
mov dword [esp + 4], edx
mov dword [esp + 0x10], eax
mov dword [esp + 8], edi
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.005119f0
mov eax, dword [esp + 0x90]
add eax, 0xc
mov edx, eax
mov word [esp + 0x90], ax
movsx eax, dx
cmp eax, ebx
jge 0x51a450
add edx, 6
movsx eax, dx
cmp eax, ebx
jg 0x51ad20
mov word [esi + 4], dx
jmp 0x51ad24
mov ebx, dword [esp + 0x100]
cmp dword [ebx + 0x14], 2
jmp 0x51a306
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.005130b0
mov dword [esp + 4], eax
lea edx, [esp + 0x88]
mov dword [esp + 0xc], edx
lea edx, [esp + 0x84]
mov dword [esp + 8], edx
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.00512e30
jmp 0x51abaa
mov eax, dword [ebp + 0x50]
mov dword [esp + 0x78], eax
jmp 0x51a325
mov eax, dword [esp + 0x5c]
mov edx, ecx
sub edx, eax
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x88]
sar edx, 1
mov dword [esp + 0x50], edx
mov edx, eax
shr edx, 0x1f
add eax, edx
sar eax, 1
mov edx, ecx
add eax, 2
sub edx, ebx
mov dword [esp + 0x4c], eax
mov eax, edx
shr eax, 0x1f
add edx, eax
sar edx, 1
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x60]
neg edx
mov eax, edx
shr eax, 0x1f
add edx, eax
sar edx, 1
mov dword [esp + 0x54], edx
jmp case.0x51a577.3
mov ebx, dword [esp + 0x5c]
xor eax, eax
mov dword [esp + 0x50], eax
xor eax, eax
add ebx, 2
mov dword [esp + 0x4c], eax
jmp 0x51a5c0
xor ecx, ecx
xor eax, eax
xor edx, edx
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x100]
add ebx, 2
mov dword [esp + 0x54], eax
mov eax, dword [ecx]
mov dword [esp + 0x58], edx
mov dword [esp + 0x50], ebx
cmp eax, 1
setne dl
cmp eax, 3
setne al
movzx eax, al
test eax, edx
je case.0x51a577.3
sub ebx, esi
mov eax, ebx
neg esi
mov dword [esp + 0x58], esi
not eax
sar eax, 0x1f
and ebx, eax
mov dword [esp + 0x50], ebx
jmp case.0x51a577.3
mov eax, dword [esp + 0x5c]
mov edx, ecx
sub edx, eax
mov eax, edx
shr eax, 0x1f
add edx, eax
sar edx, 1
xor eax, eax
mov dword [esp + 0x50], edx
mov edx, ecx
sub edx, ebx
mov dword [esp + 0x4c], eax
mov eax, edx
shr eax, 0x1f
add edx, eax
sar edx, 1
mov dword [esp + 0x58], edx
jmp 0x51a5c4
mov esi, dword [esp + 0x5c]
mov edx, ecx
sub edx, esi
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x88]
sar edx, 1
mov dword [esp + 0x50], edx
neg eax
mov edx, eax
shr edx, 0x1f
add eax, edx
mov edx, ecx
sub edx, ebx
sar eax, 1
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x4c], eax
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x60]
sar edx, 1
mov dword [esp + 0x58], edx
shr eax, 0x1f
add eax, ebx
sar eax, 1
add eax, 2
mov dword [esp + 0x54], eax
jmp case.0x51a577.3
mov eax, dword [eax + 0x84]
mov dword [esp], esi
mov ecx, dword [esp + 0x88]
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x10], ecx
sub eax, ecx
mov edx, eax
shr edx, 0x1f
xor ecx, ecx
add eax, edx
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x6c]
sar eax, 1
add eax, edx
add eax, ebx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x64]
mov ebx, dword [esp + 0x104]
add eax, edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x14], ebx
xor ebx, ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
call fcn.004c2f10
jmp 0x51a65b
mov ebx, dword [esp + 0x100]
cmp dword [ebx + 0x14], 2
jne 0x51a6e1
test byte [ebx + 0x9f], 0x40
jne 0x51a6e1
mov eax, dword [esp + 0x78]
mov ebx, dword [eax + 8]
mov dword [esp], 0x14
call sub.USER32.dll_GetSysColor
sub esp, 4
mov edx, dword [esp + 0x78]
mov esi, dword [esp + 0x64]
mov ecx, dword [esp + 0x100]
mov dword [edx + 8], eax
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x108]
add edi, eax
mov eax, edi
inc eax
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x50]
mov dword [esp + 0x1c], eax
add esi, edi
lea eax, [esi + 1]
mov dword [esp + 0x18], eax
mov eax, dword [ecx + 0x10]
mov ecx, dword [esp + 0x78]
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 8], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x104]
mov dword [esp + 4], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.00514fd0
mov edx, dword [esp + 0x78]
mov dword [edx + 8], ebx
jmp 0x51a6e1
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x110]
mov ecx, dword [esp + 0x118]
mov dword [esp + 0x18], edx
mov ebx, dword [esp + 0x6c]
mov edx, dword [esp + 0x104]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x54]
mov dword [esp + 4], edx
mov dword [esp + 8], eax
jmp 0x51ac90
mov eax, dword [ebp + 0x40]
test eax, eax
je 0x51a871
mov edi, dword [ecx + 0x34]
test edi, edi
je 0x51a883
mov eax, dword [esp + 0x78]
mov edi, dword [eax + 8]
mov dword [esp], 0x14
call sub.USER32.dll_GetSysColor
sub esp, 4
mov ecx, dword [esp + 0x100]
mov edx, dword [ecx + 0x34]
test edx, edx
je 0x51b0c4
test byte [ecx + 0x9f], 0x40
je 0x51b287
mov eax, dword [esp + 0x78]
mov dword [eax + 8], edi
jmp 0x51a87b
test byte [eax + 0x9f], 0x40
mov edx, dword [esp + 0x78]
mov esi, dword [edx + 8]
mov edi, dword [edx + 0xc]
je 0x51b113
mov edx, dword [eax + 0x48]
test edx, edx
jne 0x51b278
mov eax, dword [eax + 4]
mov edx, dword [eax + 0x2c]
mov dword [esp + 4], edx
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00511180
mov dword [esp], eax
call fcn.00510f80
mov eax, dword [eax]
mov edx, dword [esp + 0x78]
mov dword [edx + 0xc], eax
mov dword [esp], 0x11
call sub.USER32.dll_GetSysColor
sub esp, 4
mov ecx, dword [esp + 0x78]
mov dword [ecx + 8], eax
mov dword [esp], 6
call sub.USER32.dll_GetSystemMetrics
sub esp, 4
mov edx, dword [esp + 0x6c]
mov dword [esp], 6
mov ebx, dword [esp + 0x6c]
add eax, edx
mov dword [esp + 0xc4], eax
mov eax, dword [esp + 0x68]
add ebx, eax
call sub.USER32.dll_GetSystemMetrics
sub esp, 4
sub ebx, eax
mov eax, dword [esp + 0x110]
mov dword [esp + 0xcc], ebx
mov ebx, dword [esp + 0x100]
mov ecx, dword [ebx + 0x60]
mov edx, dword [ebx + 0x64]
mov ebx, dword [esp + 0x118]
add eax, ecx
add eax, edx
mov edx, 0x7fe3
mov ecx, 2
mov dword [esp + 0xc0], eax
mov eax, dword [esp + 0x110]
add eax, ebx
mov dword [esp + 0xc8], eax
mov eax, dword [ebp + 4]
mov dword [esp + 8], edx
lea edx, [esp + 0xc0]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x78]
mov dword [esp + 0xc], ecx
mov dword [esp], edx
mov edx, dword [esp + 0x104]
call fcn.005193e0
mov ecx, dword [esp + 0x78]
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], edi
jmp 0x51a8b0
mov ecx, dword [ebp + 0x40]
test ecx, ecx
je 0x51a9b3
mov ebx, dword [esi + 8]
mov dword [esp], 0x14
mov edi, 0x7ff8
call sub.USER32.dll_GetSysColor
mov dword [esi + 8], eax
sub esp, 4
xor edx, edx
mov eax, dword [esp + 0xb4]
inc eax
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xbc]
inc eax
mov dword [esp + 0xac], eax
mov eax, dword [esp + 0xb0]
inc eax
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0xb8]
inc eax
mov dword [esp + 0xa8], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0xc], edx
lea edx, [esp + 0xa0]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x104]
mov dword [esp + 8], edi
mov dword [esp], esi
call fcn.005193e0
mov dword [esi + 8], ebx
jmp 0x51a9b3
mov esi, dword [esp + 0x74]
jmp 0x51a900
mov ebx, dword [esp + 0x100]
mov eax, dword [ebx + 4]
jmp 0x51b0f4
mov edx, dword [esp + 0x78]
mov dword [edx + 8], eax
lea eax, [esi + 1]
mov dword [esp + 0x1c], eax
lea eax, [ebx + 1]
mov dword [esp + 0x18], eax
mov eax, dword [ecx + 0x38]
mov ecx, dword [esp + 0x40]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x104]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x108]
mov dword [esp + 0x10], ecx
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 4]
mov dword [esp], eax
call fcn.00514fd0
mov ecx, dword [esp + 0x100]
mov edx, dword [ecx + 0x34]
jmp 0x51b0c4