Function at 0x51bd10
Capabilities:
Identify system language via api

Disassembly:
sub esp, 0xc8
push ebx
push esi
push edi
call fcn.004b1860
cmp eax, 0x80
jl 0x51bff5
mov eax, dword [0x6b5b1c]
xor ebx, ebx
cmp eax, ebx
jne 0x51bdec
push 0xffffffffffffffff
push 0x63cfa4
call fcn.004b81f0
mov dword [esp + 0x28], eax
add esp, 8
mov dword [esp + 0x28], 0x6ae0d4
mov eax, 0x6ae0d4
mov ecx, 1
lock xadd dword [eax], ecx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x2c]
call fcn.004b7f40
mov eax, dword [esp + 0x20]
mov dword [esp + 0x24], ebx
mov byte [esp + 0x2c], bl
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x51bd91
mov edx, dword [esp + 0x20]
push edx
call fcn.004b7f30
add esp, 4
push 1
lea ecx, [esp + 0x2c]
call fcn.004b9cd0
push eax
call fcn.004fde90
add esp, 8
mov dword [esp + 0x24], eax
mov byte [esp + 0x2c], 1
cmp eax, ebx
je 0x51bdc5
push 0x642fbc
lea ecx, [esp + 0x28]
call fcn.004be740
mov dword [0x6b5b1c], eax
mov eax, dword [esp + 0x28]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x51bddf
mov edx, dword [esp + 0x28]
push edx
call fcn.004b7f30
add esp, 4
mov eax, dword [0x6b5b1c]
cmp eax, ebx
je 0x51bff5
mov ecx, 0x40
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x14]
push ecx
push 8
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x54], edx
call eax
test eax, eax
jne 0x51bec8
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x51bec8
lea edx, [esp + 0x18]
push edx
push ebx
lea eax, [esp + 0x14]
push eax
push 8
call dword [0x6b5b1c]
test eax, eax
je 0x51bec8
mov ecx, dword [esp + 0x18]
push ecx
lea ecx, [esp + 0x40]
call fcn.0051a400
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x18]
push edx
push eax
lea ecx, [esp + 0x14]
push ecx
push 8
call dword [0x6b5b1c]
test eax, eax
jne 0x51bec8
mov dword [esp + 0x34], 0x6ae094
mov edx, 0x6ae094
mov eax, 1
lock xadd dword [edx], eax
mov esi, dword [esp + 0xd8]
lea ecx, [esp + 0x34]
push ecx
mov ecx, esi
call fcn.004cd3a0
lea ecx, [esp + 0x34]
call fcn.00401113
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x4c]
cmp eax, edx
je 0x51beba
push eax
call fcn.004be5e0
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0xc8
ret 4
mov edi, 1
mov dword [esp + 0x10], 0x6ae094
mov eax, 0x6ae094
mov ecx, edi
lock xadd dword [eax], ecx
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
cmp edx, dword [esp + 0xc]
jge 0x51bf11
mov eax, dword [eax]
cmp eax, edi
je 0x51bf03
mov ecx, dword [esp + 0xc]
push ecx
lea ecx, [esp + 0x14]
call fcn.00401e73
jmp 0x51bf11
mov edx, dword [esp + 0xc]
push edx
lea ecx, [esp + 0x14]
call fcn.004b4f80
mov esi, dword [esp + 0x44]
cmp dword [esp + 0xc], ebx
jbe 0x51bf86
jmp 0x51bf20
push 0xffffffffffffffff
lea eax, [esp + 0x20]
push esi
push eax
call fcn.004bae70
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp dword [eax + 8], ebx
je 0x51bf70
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00401d91
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 8]
lea esi, [esi + edx*2 + 2]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x51bf68
mov edx, dword [esp + 0x1c]
push edx
call fcn.004b7f30
add esp, 4
sub dword [esp + 0xc], edi
jne 0x51bf20
jmp 0x51bf86
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x51bf86
mov edx, dword [esp + 0x1c]
push edx
call fcn.004b7f30
add esp, 4
mov edi, dword [esp + 0xd8]
lea eax, [esp + 0x10]
push eax
mov ecx, edi
call fcn.004cd3a0
mov ecx, dword [esp + 0x10]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x51bfce
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0xc]
lea edx, [eax + ecx*4 + 0x14]
mov ecx, dword [eax + 8]
push edx
lea edx, [eax + ecx*4 + 0x14]
push edx
lea ecx, [esp + 0x18]
mov esi, eax
call fcn.00401f5b
push esi
call fcn.004be5e0
add esp, 4
mov eax, dword [esp + 0x44]
lea ecx, [esp + 0x4c]
cmp eax, ecx
je 0x51c0d9
push eax
call fcn.004be5e0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc8
ret 4
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx ebx, ax
call fcn.00519aa0
push eax
lea edx, [esp + 0x38]
push edx
call fcn.004b9930
mov esi, eax
add esp, 0xc
mov dword [esp + 0x14], 0x6ae094
mov eax, 0x6ae094
mov ecx, 1
lock xadd dword [eax], ecx
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
cmp eax, 1
je 0x51c059
push 1
push closesocket
lea ecx, [esp + 0x1c]
call fcn.00401deb
test eax, eax
je 0x51c077
mov ecx, dword [esi]
mov dword [eax], ecx
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x51c077
mov esi, dword [esi]
mov dword [esp + 0x38], esi
mov eax, 1
lock xadd dword [esi], eax
lea ecx, [esp + 0x14]
call fcn.004b5090
mov ecx, dword [esp + 0x38]
mov dword [eax], ecx
mov edi, dword [esp + 0xd8]
lea edx, [esp + 0x14]
push edx
mov ecx, edi
call fcn.004cd3a0
mov eax, dword [esp + 0x14]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x51c0bf
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 0xc]
lea ecx, [eax + edx*4 + 0x14]
mov edx, dword [eax + 8]
mov esi, eax
push ecx
lea eax, [eax + edx*4 + 0x14]
push eax
lea ecx, [esp + 0x1c]
call fcn.00401f5b
push esi
call fcn.004be5e0
add esp, 4
mov ecx, dword [esp + 0x30]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x51c0d9
mov eax, dword [esp + 0x30]
push eax
call fcn.004b7f30
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0xc8
ret 4