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

Disassembly:
push 0xffffffffffffffff
push 0x56ec41
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
mov al, byte [esp + 0x4c]
push ebx
push ebp
push esi
push edi
xor edi, edi
mov esi, ecx
mov byte [esp + 0x3c], al
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
push 6
push 0x5bcdac
lea ecx, [esp + 0x28]
mov dword [esp + 0x5c], edi
call fcn.005318a0
push 6
push 0x59c0fc
lea ecx, [esp + 0x24]
mov byte [esp + 0x5c], 1
call fcn.005318a0
push 6
push 0x59c0f4
lea ecx, [esp + 0x20]
mov byte [esp + 0x5c], 2
call fcn.005318a0
push edi
push edi
push ecx
mov byte [esp + 0x60], 3
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59b910
mov byte [esp + 0x28], 0
call fcn.005318a0
push ecx
mov byte [esp + 0x64], 4
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59c0ec
call fcn.005318a0
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
mov ecx, esi
call fcn.00521230
mov edi, dword [esp + 0x5c]
mov ebx, 1
and edi, 0xff
mov dword [esp + 0x28], edi
lea ecx, [edi + edi*2]
lea ebp, [edi + ecx*4]
shl ebp, 2
mov cl, byte [ebp + 0x581744]
mov al, byte [ebp + 0x58173a]
mov dx, word [ebp + 0x581730]
mov byte [esp + 0x2c], cl
mov cl, byte [ebp + 0x581758]
mov byte [esp + 0x12], al
mov ax, word [ebp + 0x581734]
cmp cl, bl
mov word [esp + 0x30], dx
mov dword [esp + 0x24], eax
jb 0x51bfe4
movsx edx, bx
mov ecx, esi
mov al, byte [edx + ebp + 0x581758]
push eax
call fcn.0051ca40
movzx cx, byte [ebp + 0x581758]
inc ebx
cmp bx, cx
jle 0x51bfc0
mov eax, dword [esp + 0x24]
lea ecx, [edi - 0xa]
cmp ecx, 0x1d
ja case.0x51bff4.12
xor edx, edx
mov dl, byte [ecx + 0x51c5bc]
jmp dword [edx*4 + 0x51c5b0]
mov cl, byte [ebp + 0x58174a]
mov byte [esp + 0x14], cl
jmp case.0x51bff4.12
mov dl, byte [ebp + 0x581748]
mov byte [esp + 0x14], dl
test ax, ax
je 0x51c072
xor ecx, ecx
mov cl, ah
push ecx
push 4
lea ecx, [esp + 0x20]
call fcn.00531ad0
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x18]
push edx
push 5
call fcn.00531ad0
push 0
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59b910
call fcn.005318a0
push ecx
lea eax, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
mov byte [esp + 0x68], 5
call fcn.00531810
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
mov cl, byte [esp + 0x12]
mov al, byte [esp + 0x2c]
cmp al, cl
jbe 0x51c0be
mov ecx, dword [esp + 0x2c]
lea edx, [edi + edi*2]
and ecx, 0xff
push 2
lea eax, [edi + edx*4]
lea edx, [ecx + eax*2]
lea ecx, [esi + 0xe]
push ecx
mov ax, word [edx*2 + 0x581744]
movsx ecx, ax
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [esi + 0x78]
lea eax, [eax + eax*2]
lea edx, [eax + eax*4 + 0x5b8418]
push edx
call fcn.0043cb50
push 0
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59b910
call fcn.005318a0
push ecx
mov byte [esp + 0x64], 6
mov ecx, esp
mov dword [esp + 0x3c], esp
push 6
push 0x59c0e4
call fcn.005318a0
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
mov ecx, dword [esp + 0x5c]
lea eax, [esp + 0x3c]
push eax
push ecx
mov ecx, esi
call fcn.0051c7f0
mov edx, dword [esp + 0x30]
lea ecx, [esp + 0x20]
push edx
push 5
call fcn.00531ad0
movzx ax, byte [esp + 0x12]
mov word [esp + 0x12], ax
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x38], esp
push edx
call fcn.00531810
mov ecx, dword [0x5c6634]
call fcn.005396d0
mov ax, word [esp + 0x12]
cmp ax, 1
jl 0x51c188
lea edi, [ebp + 0x58173b]
movsx ebx, ax
mov al, byte [edi]
lea ecx, [esp + 0x1c]
push eax
push 5
call fcn.00531ad0
push 1
push ecx
lea edx, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x3c], esp
push edx
call fcn.00531810
mov ecx, dword [0x5c6634]
call fcn.00539850
inc edi
dec ebx
jne 0x51c158
mov al, byte [esp + 0x3c]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x44], esp
mov dword [esp + 0x44], edi
mov byte [edi], al
mov ecx, dword [esp + 0x50]
test ecx, ecx
jne 0x51c1a7
xor eax, eax
jmp 0x51c1b0
mov eax, dword [esp + 0x54]
sub eax, ecx
sar eax, 2
test eax, eax
jge 0x51c1b6
xor eax, eax
lea ecx, [eax*4]
push ecx
call fcn.00556a96
mov dword [edi + 4], eax
mov ecx, dword [esp + 0x58]
mov ebx, dword [esp + 0x54]
add esp, 4
mov edi, eax
cmp ebx, ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edi
je 0x51c20b
mov dword [esp + 0x48], edi
test edi, edi
mov byte [esp + 0x64], 7
je 0x51c1f4
push ebx
mov ecx, edi
call fcn.00531810
mov eax, dword [esp + 0x3c]
add ebx, 4
add edi, 4
cmp ebx, eax
mov byte [esp + 0x64], 3
mov dword [esp + 0x40], edi
jne 0x51c1df
mov eax, dword [esp + 0x44]
mov ecx, esi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
call fcn.0051c610
test ax, ax
je 0x51c350
mov ecx, dword [0x5c6634]
call fcn.00539bf0
mov di, ax
inc edi
test di, di
je 0x51c128
mov edx, dword [esp + 0x28]
lea eax, [edx - 0xa]
cmp eax, 0x1d
ja case.0x51c255.12
xor ecx, ecx
mov cl, byte [eax + 0x51c5e8]
jmp dword [ecx*4 + 0x51c5dc]
movsx eax, di
dec eax
je 0x51c26e
dec eax
je 0x51c3b3
jmp 0x51c128
movzx dx, byte [esp + 0x14]
cmp dx, word [ebp + 0x581746]
jae 0x51c2b7
mov cl, byte [esp + 0x14]
inc cl
lea eax, [esi + 0xe]
mov byte [esp + 0x14], cl
push 2
push eax
mov eax, dword [esp + 0x1c]
and eax, 0xff
lea ecx, [eax*8]
sub ecx, eax
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4 + 0x5b8418]
push ecx
lea ecx, [esi + 0x78]
call fcn.0043cb50
jmp 0x51c128
push 0
call dword [sym.imp.USER32.dll_MessageBeep]
jmp 0x51c128
movsx eax, di
dec eax
je 0x51c26e
dec eax
je 0x51c2d9
dec eax
je 0x51c454
jmp 0x51c128
movzx dx, byte [esp + 0x14]
cmp dx, word [ebp + 0x581748]
jbe 0x51c2b7
mov cl, byte [esp + 0x14]
dec cl
jmp 0x51c283
mov eax, dword [esp + 0x28]
movsx ecx, di
lea edx, [eax + eax*2]
lea eax, [eax + edx*4]
lea edx, [ecx + eax*2]
mov al, byte [edx*2 + 0x581744]
cmp al, 0xff
mov byte [esp + 0x24], al
je 0x51c33a
lea eax, [esi + 0xe]
push 2
push eax
mov eax, dword [esp + 0x2c]
and eax, 0xff
lea ecx, [eax*8]
sub ecx, eax
lea eax, [ecx + ecx*2]
lea ecx, [eax + eax*4 + 0x5b8418]
push ecx
lea ecx, [esi + 0x78]
call fcn.0043cb50
movzx dx, byte [ebp + 0x58173a]
cmp di, dx
je 0x51c53c
jmp 0x51c128
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x51c3a2
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x51c390
mov esi, dword [esp + 0x40]
push esi
call fcn.00556360
add esp, 4
xor ax, ax
jmp 0x51c59b
mov eax, dword [esp + 0x28]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
movsx eax, di
lea ecx, [eax + edx*2]
mov al, byte [ecx*2 + 0x581744]
cmp al, 0xff
mov byte [esp + 0x24], al
je 0x51c3fd
mov eax, dword [esp + 0x24]
lea edx, [esi + 0xe]
and eax, 0xff
push 2
push edx
lea ecx, [eax*8]
sub ecx, eax
lea eax, [ecx + ecx*2]
lea ecx, [esi + 0x78]
lea eax, [eax + eax*4 + 0x5b8418]
push eax
call fcn.0043cb50
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x51c58e
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x51c441
jmp 0x51c58a
mov eax, dword [esp + 0x28]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
movsx eax, di
lea ecx, [eax + edx*2]
mov al, byte [ecx*2 + 0x581744]
cmp al, 0xff
mov byte [esp + 0x24], al
je 0x51c49e
mov eax, dword [esp + 0x24]
lea edx, [esi + 0xe]
and eax, 0xff
push 2
push edx
lea ecx, [eax*8]
sub ecx, eax
lea eax, [ecx + ecx*2]
lea ecx, [esi + 0x78]
lea eax, [eax + eax*4 + 0x5b8418]
push eax
call fcn.0043cb50
mov al, byte [esp + 0x5c]
cmp al, 0x25
je 0x51c4ae
cmp al, 0x26
je 0x51c4ae
cmp al, 0x27
jne 0x51c4ec
push 0
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x68], esp
push 6
push 0x59b910
call fcn.005318a0
push ecx
mov byte [esp + 0x64], 8
mov ecx, esp
mov dword [esp + 0x48], esp
push 6
push 0x59c0dc
call fcn.005318a0
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x51c58e
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x51c52c
jmp 0x51c58a
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x51c58e
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x51c57c
mov esi, dword [esp + 0x40]
push esi
call fcn.00556360
add esp, 4
mov ax, 1
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x48
ret 4