Function at 0x1000a300
Capabilities:
Identify system language via api

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x38
mov eax, dword [eax]
push ebx
push ebp
push esi
mov ecx, dword [eax]
push edi
test ecx, ecx
je 0x1000a5e3
mov ecx, dword [eax + 4]
xor edx, edx
test ecx, ecx
mov dword [esp + 0x14], edx
jne 0x1000a332
cmp dword [eax + 8], 0x12
jne 0x1000a332
mov ecx, dword [eax + 0xc]
lea ebx, [eax + 0x10]
jmp 0x1000a335
lea ebx, [eax + 8]
mov edi, dword [esp + 0x4c]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x4c]
lea ebp, [esp + 0x20]
mov al, byte [ebx]
add ebx, 4
mov byte [esp + 0x18], al
mov eax, dword [esp + 0x18]
and eax, 0xff
sub eax, 2
je 0x1000a362
dec eax
je 0x1000a36f
dec eax
jne 0x1000a3c4
mov eax, dword [ebx]
mov dword [ebp], eax
add ebp, 4
add ebx, 4
jmp 0x1000a345
test edx, edx
jne 0x1000a390
push pe_nt_image_headers32
call sym.fbclient.dll_gds__alloc
test eax, eax
mov dword [esp + 0x14], eax
mov ecx, eax
mov edi, pe_nt_image_headers32
je 0x1000a5e3
mov ax, word [ebx]
mov esi, dword [ebx + 4]
add ebx, 4
mov dword [ebp], ecx
add ebx, 4
add ebp, 4
cmp di, ax
jge 0x1000a3a9
mov eax, edi
test ax, ax
je 0x1000a3ba
mov dl, byte [esi]
mov byte [ecx], dl
inc ecx
inc esi
dec eax
test ax, ax
jne 0x1000a3ae
mov edx, dword [esp + 0x14]
mov byte [ecx], 0
inc ecx
jmp 0x1000a345
mov ecx, dword [esp + 0x50]
sub ebx, 4
mov eax, dword [ecx]
xor ecx, ecx
mov cl, byte [eax]
lea esi, [ecx - 1]
cmp esi, 0x11
ja case.0x1000a3e5.6
xor ecx, ecx
mov cl, byte [esi + 0x1000a608]
jmp dword [ecx*4 + 0x1000a5f0]
mov ecx, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x1c]
lea eax, [esp + 0x18]
push edx
push eax
push ecx
call sym.fbclient.dll_gds__decode
mov esi, eax
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x4c]
push edi
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push ebp
push 0x80
push esi
push eax
push 0
call sym.fbclient.dll_gds__msg_format
test ax, ax
jge 0x1000a5a8
cmp esi, 0x2ca
jge 0x1000a47d
test esi, esi
jl 0x1000a47d
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push edi
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esi*4 + 0x1003e1d0]
push eax
push ecx
push edx
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x1c
jmp 0x1000a5a8
mov eax, dword [esp + 0x10]
push eax
push str.unknown_ISC_error__ld
jmp 0x1000a59e
mov eax, dword [eax + 4]
mov ebp, dword [esp + 0x4c]
mov cl, byte [eax]
inc eax
test cl, cl
mov byte [ebp], cl
lea esi, [ebp + 1]
je 0x1000a5a8
mov cl, byte [eax]
mov byte [esi], cl
inc esi
inc eax
test cl, cl
jne 0x1000a4a4
jmp 0x1000a5a8
mov ecx, dword [esp + 0x10]
test ecx, ecx
jle 0x1000a4d5
mov edx, dword [sym.imp.MSVCRT.dll__sys_nerr]
cmp ecx, dword [edx]
jge 0x1000a4d5
mov eax, dword [sym.imp.MSVCRT.dll__sys_errlist]
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x1000a4d5
mov edi, eax
jmp 0x1000a50f
cmp ecx, 0x3c
jne 0x1000a505
mov edi, str.connection_timed_out
or ecx, 0xffffffff
xor eax, eax
mov ebp, dword [esp + 0x4c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x1000a5a8
cmp ecx, 0x3d
jne 0x1000a532
mov edi, str.connection_refused
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ebp, dword [esp + 0x4c]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x1000a5a8
mov ebp, dword [esp + 0x4c]
push ecx
push str.unknown_unix_error__ld
jmp 0x1000a59e
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x4c]
push eax
push str.unknown_dos_error__ld
jmp 0x1000a59e
mov ebp, dword [esp + 0x4c]
push 0
push 0x80
push ebp
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
mov edi, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_FormatMessageA]
and eax, 0xffff
push eax
push edi
push 0
push 0x1000
call esi
test ax, ax
jne 0x1000a5a8
push 0
push 0x80
push ebp
push 0
push edi
push 0
push 0x1000
call esi
test ax, ax
jne 0x1000a5a8
push edi
push str.unknown_Win32_error__ld
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1000a5b6
push eax
call sym.fbclient.dll_gds__free
mov ecx, dword [esp + 0x50]
mov eax, ebp
mov dword [ecx], ebx
mov cl, byte [ebp]
test cl, cl
je 0x1000a5cd
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x1000a5c5
pop edi
sub eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 8
test edx, edx
je 0x1000a5e3
push edx
call sym.fbclient.dll_gds__free
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x38
ret 8