Function at 0x51efe0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x5f3008]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x1c]
push ebx
xor ebx, ebx
mov dword [ebp - 0x130], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [ecx], ebx
xor esi, esi
mov dword [ecx + 4], ebx
mov byte [edx], bl
push edi
mov edi, dword [0x6167b8]
mov dword [ebp - 0x128], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x124], eax
mov al, 1
mov dword [ebp - 0x11c], esi
mov esi, dword [edi]
mov dword [ebp - 0x12c], ecx
mov dword [ebp - 0x134], edx
mov dword [ebp - 0xbc], edi
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xe4], ebx
mov dword [ebp - 0x114], eax
mov byte [ebp - 0x104], al
mov dword [ebp - 0xb4], ebx
mov dword [ebp - 0x108], ebx
mov dword [ebp - 0x118], ebx
mov dword [edi + 0x2182c], ebx
mov dword [edi + 0x21830], ebx
mov dword [edi + 0x21834], ebx
mov dword [edi + 0x21838], ebx
mov dword [edi + 0x344], ebx
mov dword [edi + 0x348], ebx
test esi, esi
je 0x51f0b3
push dword [ebp + 0x18]
mov ecx, esi
call fcn.00531610
mov esi, dword [esi]
inc ebx
test esi, esi
jne 0x51f096
mov dword [ebp - 0x108], ebx
mov ebx, dword [ebp - 0xdc]
mov ecx, dword [edi + 0x3c]
movzx eax, byte [ecx + 0x1d557]
push eax
lea eax, [ecx + 0x14]
push eax
call fcn.0051fb80
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov edx, dword [edi + 0x3c]
add esp, 4
mov esi, eax
mov dword [ebp - 0x120], esi
movzx ecx, byte [edx + 0x1d557]
push esi
push ecx
lea ecx, [edx + 0x14]
push ecx
call fcn.0051fce0
mov ecx, dword [edi]
xor edx, edx
mov byte [ebp - 0xd1], 1
mov dword [ebp - 0xd8], ecx
mov dword [ebp - 0xc8], 0
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0x100], edx
test ecx, ecx
je 0x51f135
mov eax, dword [ecx + 0x1c]
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0x108], 0x1f4
jle 0x51f16d
mov eax, dword [edi + 0x40]
push 0x5e827c
push 0
push 0x801d
push dword [eax]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [edi + 0x40]
push 5
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [ebp - 0xd8]
xor edx, edx
test ecx, ecx
je 0x51fadf
cmp ecx, dword [edi + 8]
jne 0x51f183
or ebx, 5
mov dword [ebp - 0xdc], ebx
mov ebx, dword [ebp - 0xc8]
mov dword [ebp - 0xc4], 0
test edx, edx
je 0x51f1e0
mov eax, dword [ebp - 0x10c]
mov esi, edx
mov dword [ebp - 0xd0], eax
mov al, 1
test al, al
je 0x51f1da
mov ecx, dword [edi + 0x48]
movzx eax, byte [ecx + 0x6c55]
push eax
movzx eax, byte [ecx + 0x6c54]
mov ecx, esi
push eax
lea eax, [ebp - 0xc4]
push eax
push ebx
lea eax, [ebp - 0xd0]
push eax
call fcn.005311b0
mov esi, dword [esi]
test esi, esi
jne 0x51f1a7
mov ecx, dword [ebp - 0xd8]
mov al, 1
mov dword [ebp - 0xcc], ebx
mov esi, ecx
mov dword [ebp - 0xd0], 0
xor ebx, ebx
mov byte [ebp - 0xb5], al
nop dword [eax]
test al, al
je 0x51f250
mov ecx, dword [edi + 0x48]
movzx eax, byte [ecx + 0x6c55]
push eax
movzx eax, byte [ecx + 0x6c54]
mov ecx, esi
push eax
push 0
push 0
lea eax, [ebp - 0xb5]
push eax
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.00531230
add ebx, eax
cmp dword [ebp - 0xcc], 0
jne 0x51f244
mov esi, dword [esi]
test esi, esi
je 0x51f250
mov al, byte [ebp - 0xb5]
jmp 0x51f200
mov edi, dword [ebp - 0xc4]
add edi, ebx
mov dword [ebp - 0xec], ebx
test edi, edi
jle 0x51fa2c
xor ecx, ecx
lea esi, [edi + 0x64]
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov dword [ebp - 0xc0], eax
xor ecx, ecx
lea eax, [edi + 0x65]
mov edi, 4
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov dword [ebp - 0xf4], eax
xor ecx, ecx
mov eax, esi
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov dword [ebp - 0xf8], eax
xor ecx, ecx
mov eax, esi
mul edi
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
mov esi, dword [ebp - 0x100]
add esp, 0x10
mov edi, dword [ebp - 0xbc]
mov edx, eax
mov dword [ebp - 0xfc], edx
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0xe8], 0
test esi, esi
je 0x51f36e
mov eax, dword [ebp - 0x10c]
mov ebx, dword [ebp - 0xc0]
mov dword [ebp - 0xd0], eax
mov al, 1
test al, al
je 0x51f368
mov ecx, dword [edi + 0x48]
movzx eax, byte [ecx + 0x6c55]
push eax
movzx eax, byte [ecx + 0x6c54]
mov ecx, esi
push eax
push edx
push dword [ebp - 0xf8]
lea eax, [ebp - 0xe8]
push dword [ebp - 0xf4]
push ebx
push eax
lea eax, [ebp - 0xe0]
push eax
push dword [ebp - 0xc8]
lea eax, [ebp - 0xd0]
push eax
call fcn.005313a0
mov esi, dword [esi]
mov edx, dword [ebp - 0xfc]
test esi, esi
jne 0x51f315
mov ebx, dword [ebp - 0xec]
mov eax, dword [ebp - 0xc8]
xor ecx, ecx
mov esi, dword [ebp - 0xd8]
mov dword [ebp - 0xcc], eax
mov al, 1
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 0xb5], al
mov dword [ebp - 0x110], ecx
test ebx, ebx
jle 0x51f48f
test al, al
je 0x51f489
mov eax, dword [ebp - 0xbc]
cmp esi, dword [eax + 8]
jne 0x51f3c2
or dword [ebp - 0xdc], 4
mov ecx, dword [eax + 0x48]
movzx eax, byte [ecx + 0x6c55]
push eax
movzx eax, byte [ecx + 0x6c54]
mov ecx, esi
push eax
push 0
push 0
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0xb5]
push eax
lea eax, [ebp - 0xdc]
push eax
push edx
push dword [ebp - 0xf8]
lea eax, [ebp - 0xe8]
push dword [ebp - 0xf4]
push dword [ebp - 0xc0]
push eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebp - 0xd0]
push eax
call fcn.00531470
mov ecx, dword [ebp - 0xf0]
add ecx, eax
movsx eax, word [ebp - 0x110]
mov dword [ebp - 0xf0], ecx
sub eax, 1
je 0x51f451
sub eax, 1
jne 0x51f469
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x100], eax
jmp 0x51f469
mov eax, dword [ebp - 0xc8]
mov dword [ebp - 0x10c], eax
mov eax, dword [ebp - 0xd8]
mov dword [ebp - 0x100], eax
cmp dword [ebp - 0xcc], 0
jne 0x51f474
mov esi, dword [esi]
test esi, esi
je 0x51f489
mov al, byte [ebp - 0xb5]
mov edx, dword [ebp - 0xfc]
jmp 0x51f3a8
mov edi, dword [ebp - 0xbc]
cmp dword [ebp - 0xe4], ecx
jl 0x51f4a2
sub dword [ebp - 0xe4], ecx
jmp 0x51f9fd
mov ebx, dword [ebp - 0xe4]
mov dword [ebp - 0xe0], ebx
nop
mov ecx, dword [edi + 0x3c]
mov dword [ebp - 0xe8], ecx
cmp byte [ecx + 0x1d557], 0
je 0x51f6dc
mov ecx, dword [ebp - 0xc4]
mov edx, dword [ebp - 0xc0]
lea eax, [ebx + ecx]
cmp word [edx + eax*2], 0xa
lea edi, [edx + eax*2]
jne 0x51f518
test eax, eax
jle 0x51f518
cmp word [edi - 2], 0xd
jne 0x51f518
mov edx, ecx
lea esi, [ebx - 2]
neg edx
cmp esi, edx
jl 0x51f545
lea eax, [esi + ecx]
mov ecx, dword [ebp - 0xc0]
lea ecx, [ecx + eax*2]
movzx eax, word [ecx]
cmp eax, 0xd
je 0x51f545
cmp eax, 0xa
je 0x51f545
dec esi
sub ecx, 2
cmp esi, edx
jge 0x51f501
jmp 0x51f545
mov edx, ecx
lea esi, [ebx - 1]
neg edx
cmp esi, edx
jl 0x51f545
lea eax, [esi + ecx]
mov ecx, dword [ebp - 0xc0]
lea ecx, [ecx + eax*2]
nop
movzx eax, word [ecx]
cmp eax, 0xd
je 0x51f545
cmp eax, 0xa
je 0x51f545
dec esi
sub ecx, 2
cmp esi, edx
jge 0x51f530
mov edx, dword [ebp - 0xec]
inc esi
cmp ebx, edx
jge 0x51f595
mov ecx, edi
movzx eax, word [ecx]
cmp eax, 0xd
je 0x51f569
cmp eax, 0xa
je 0x51f590
inc ebx
add ecx, 2
cmp ebx, edx
jl 0x51f552
jmp 0x51f595
lea ecx, [ebx + 1]
cmp ecx, edx
jge 0x51f590
mov eax, dword [ebp - 0xc4]
mov edx, dword [ebp - 0xc0]
add eax, ebx
cmp word [edx + eax*2 + 2], 0xa
mov edx, dword [ebp - 0xec]
jne 0x51f590
mov ebx, ecx
jmp 0x51f594
cmp ebx, edx
jge 0x51f595
inc ebx
mov ecx, dword [ebp - 0xe8]
mov eax, 0x5e829c
cmp byte [ecx + 0x1d555], 0
mov ecx, 0x5e706c
cmovne eax, ecx
push eax
lea eax, [ebp - 0x10]
push 5
push eax
call fcn.00565fee
mov eax, dword [ebp - 0xbc]
add esp, 0xc
mov edx, dword [ebp - 0xc0]
mov eax, dword [eax + 0x3c]
mov ecx, dword [eax + 4]
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0xb4]
push eax
mov eax, dword [ebp - 0xc4]
add eax, ebx
push 0
lea eax, [edx + eax*2]
push eax
mov eax, dword [ebp - 0xc4]
add eax, esi
mov esi, edx
cmp byte [ebp - 0xd1], 0
push edi
lea eax, [esi + eax*2]
push eax
lea eax, [ebp - 0x10]
push eax
je 0x51f64a
push dword [ebp - 0x120]
call ecx
add esp, 0x20
mov byte [ebp - 0xd1], 0
test eax, eax
jns 0x51f653
push 0x30
push 0x5e8290
lea eax, [ebp - 0xb0]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edi, dword [ebp - 0xbc]
dec ebx
mov dword [ebp - 0xe4], 0
jmp 0x51f9c6
push 0
call ecx
add esp, 0x20
test eax, eax
jle 0x51f634
mov ecx, dword [ebp - 0xb4]
push dword [ebp - 0x104]
mov edx, dword [ebp - 0xc4]
push dword [ebp + 0x18]
mov eax, dword [ecx + 0x20]
push dword [ebp - 0xc8]
push dword [ebp - 0xd8]
mov edi, dword [eax]
mov eax, dword [ecx + 0x24]
mov ecx, dword [eax]
lea eax, [edx + edx]
sub ecx, edi
sub edi, eax
sub edi, esi
lea eax, [ebp - 0xe4]
push eax
mov eax, dword [ebp - 0xf0]
mov esi, 1
sar edi, 1
sar ecx, 1
cmovne esi, ecx
mov ecx, dword [ebp - 0xbc]
add eax, edx
push eax
push dword [ebp - 0xdc]
lea eax, [edi + edx]
push esi
push eax
push dword [ebp - 0xfc]
push dword [ebp - 0xf8]
push dword [ebp - 0xf4]
call fcn.0051ff60
lea ebx, [esi + edi]
mov edi, dword [ebp - 0xbc]
dec ebx
jmp 0x51f9c6
xor edx, edx
mov dword [ebp - 0xcc], edx
cmp word [ecx + 0x14], dx
je 0x51f9bc
mov eax, dword [ebp - 0xe0]
lea edi, [edx + 0x14]
add eax, dword [ebp - 0xc4]
mov esi, dword [ebp - 0xc0]
mov dword [ebp - 0xd0], eax
lea esi, [esi + eax*2]
nop dword [eax]
cmp ebx, dword [ebp - 0xec]
jge 0x51f82a
mov eax, dword [ebp - 0xbc]
mov eax, dword [eax + 0x3c]
cmp byte [eax + 0x1d555], 0
lea ecx, [edi + eax]
je 0x51f73c
mov ax, word [ecx]
cmp ax, word [esi]
jmp 0x51f809
movzx eax, word [ecx]
lea ecx, [eax - 0x61]
cmp cx, 0x19
ja 0x51f750
add eax, 0xffffffe0
movzx edx, ax
jmp 0x51f79d
lea ecx, [eax - 0xe0]
cmp cx, 0x16
ja 0x51f764
add eax, 0xffffffe0
movzx edx, ax
jmp 0x51f79d
lea ecx, [eax - 0xf8]
cmp cx, 6
ja 0x51f778
add eax, 0xffffffe0
movzx edx, ax
jmp 0x51f79d
mov ecx, 0xff
cmp ax, cx
jne 0x51f787
lea edx, [ecx + 0x79]
jmp 0x51f79d
lea ecx, [eax + 0xbf]
cmp cx, 0x19
ja 0x51f79b
add eax, 0xffffffe0
movzx edx, ax
jmp 0x51f79d
mov edx, eax
movzx ecx, word [esi]
lea eax, [ecx - 0x61]
cmp ax, 0x19
ja 0x51f7b1
lea eax, [ecx - 0x20]
movzx eax, ax
jmp 0x51f800
lea eax, [ecx - 0xe0]
cmp ax, 0x16
ja 0x51f7c5
lea eax, [ecx - 0x20]
movzx eax, ax
jmp 0x51f800
lea eax, [ecx - 0xf8]
cmp ax, 6
ja 0x51f7d9
lea eax, [ecx - 0x20]
movzx eax, ax
jmp 0x51f800
mov eax, 0xff
cmp cx, ax
jne 0x51f7ea
mov eax, 0x178
jmp 0x51f800
lea eax, [ecx + 0xbf]
cmp ax, 0x19
ja 0x51f7fe
lea eax, [ecx - 0x20]
movzx eax, ax
jmp 0x51f800
mov eax, ecx
cmp dx, ax
mov edx, dword [ebp - 0xcc]
mov ecx, dword [ebp - 0xe8]
jne 0x51f82a
add edi, 2
inc edx
add esi, 2
mov dword [ebp - 0xcc], edx
inc ebx
cmp word [edi + ecx], 0
jne 0x51f710
test edx, edx
jle 0x51f9b0
cmp word [ecx + edx*2 + 0x14], 0
jne 0x51f9b0
cmp byte [ecx + 0x1d553], 0
je 0x51f948
mov eax, dword [ebp - 0xd0]
mov edi, dword [ebp - 0xc0]
test eax, eax
jle 0x51f8a3
movzx edx, word [edi + eax*2 - 2]
xor ecx, ecx
xor eax, eax
mov ebx, 0xffff
nop dword [eax]
cmp dx, ax
je 0x51f897
inc ecx
movsx eax, cx
movzx eax, word [eax*2 + 0x591570]
cmp ax, bx
jne 0x51f870
mov ebx, dword [ebp - 0xe0]
mov edi, dword [ebp - 0xbc]
jmp 0x51f9c6
mov edx, dword [ebp - 0xcc]
mov eax, dword [ebp - 0xd0]
mov ebx, dword [ebp - 0xe0]
lea esi, [edx + ebx]
cmp esi, dword [ebp - 0xec]
jge 0x51f8ea
add eax, edx
xor ecx, ecx
movzx edx, word [edi + eax*2]
xor eax, eax
mov edi, 0xffff
cmp dx, ax
je 0x51f8e4
inc ecx
movsx eax, cx
movzx eax, word [eax*2 + 0x591570]
cmp ax, di
jne 0x51f8c3
mov edi, dword [ebp - 0xbc]
jmp 0x51f9c6
mov edx, dword [ebp - 0xcc]
push dword [ebp - 0x104]
mov ecx, dword [ebp - 0xbc]
lea eax, [ebp - 0xe4]
push dword [ebp + 0x18]
push dword [ebp - 0xc8]
push dword [ebp - 0xd8]
push eax
mov eax, dword [ebp - 0xc4]
add eax, dword [ebp - 0xf0]
push eax
push dword [ebp - 0xdc]
push edx
push dword [ebp - 0xd0]
push dword [ebp - 0xfc]
push dword [ebp - 0xf8]
push dword [ebp - 0xf4]
call fcn.0051ff60
mov edi, dword [ebp - 0xbc]
lea ebx, [esi - 1]
jmp 0x51f9c6
push dword [ebp - 0x104]
mov ecx, dword [ebp - 0xbc]
lea eax, [ebp - 0xe4]
push dword [ebp + 0x18]
push dword [ebp - 0xc8]
push dword [ebp - 0xd8]
push eax
mov eax, dword [ebp - 0xc4]
add eax, dword [ebp - 0xf0]
push eax
push dword [ebp - 0xdc]
push edx
push dword [ebp - 0xd0]
push dword [ebp - 0xfc]
push dword [ebp - 0xf8]
push dword [ebp - 0xf4]
call fcn.0051ff60
mov ebx, dword [ebp - 0xe0]
mov edi, dword [ebp - 0xbc]
dec ebx
add ebx, dword [ebp - 0xcc]
jmp 0x51f9c6
mov edi, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0xe0]
mov dword [ebp - 0xe4], 0
inc ebx
mov dword [ebp - 0xe0], ebx
cmp ebx, dword [ebp - 0xf0]
jl 0x51f4b0
mov eax, dword [ebp - 0x114]
mov ecx, 0
test byte [ebp - 0xdc], 2
movzx eax, al
cmovne eax, ecx
mov dword [ebp - 0x114], eax
mov byte [ebp - 0x104], al
push dword [ebp - 0xc0]
call fcn.00560853
push dword [ebp - 0xf4]
call fcn.00560853
push dword [ebp - 0xf8]
call fcn.00560853
push dword [ebp - 0xfc]
call fcn.00560853
add esp, 0x10
mov esi, dword [ebp - 0xc8]
mov edi, dword [ebp - 0xbc]
mov ebx, dword [ebp - 0xdc]
mov ecx, dword [ebp - 0xd8]
mov esi, dword [esi]
mov edx, dword [ebp - 0x100]
mov dword [ebp - 0xc8], esi
test esi, esi
jne 0x51f175
mov eax, dword [edi + 0x48]
mov ecx, dword [ecx]
mov dword [ebp - 0xd8], ecx
cmp byte [eax + 0x2083d], 0
jne 0x51fb66
mov ebx, dword [ebp - 0x108]
cmp ebx, 0x1f4
jle 0x51fac1
mov eax, dword [ebp - 0x118]
inc eax
mov dword [ebp - 0x118], eax
imul eax, eax, 0x64
cdq
idiv ebx
mov esi, eax
cmp esi, dword [ebp - 0x11c]
je 0x51fac1
call fcn.0040f410
mov ecx, dword [edi + 0x40]
push esi
push 0
push 0x801c
push dword [ecx]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 0xd8]
mov dword [ebp - 0x11c], esi
test ecx, ecx
je 0x51fae7
mov esi, dword [ecx + 0x1c]
mov ebx, dword [ebp - 0xdc]
mov edx, dword [ebp - 0x100]
mov dword [ebp - 0xc8], esi
jmp 0x51f175
mov ebx, dword [ebp - 0x108]
jmp 0x51faed
mov esi, dword [ebp - 0x120]
mov ecx, dword [ebp - 0xb4]
test ecx, ecx
je 0x51fb03
mov eax, dword [edi + 0x3c]
push ecx
mov eax, dword [eax + 8]
call eax
add esp, 4
push esi
call fcn.00560853
add esp, 4
cmp ebx, 0x1f4
jle 0x51fb21
mov eax, dword [edi + 0x40]
push 0
push dword [eax]
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [edi + 0x2182c], 0
je 0x51fb66
push dword [ebp - 0x124]
mov ecx, edi
push dword [ebp - 0x128]
push dword [ebp - 0x12c]
push dword [ebp - 0x130]
call fcn.00520530
mov ecx, dword [ebp - 0x134]
mov byte [ecx], al
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0056060a
mov esp, ebp
pop ebp
ret 0x18