Function at 0x412820
Capabilities:
Identify system language via api

Disassembly:
push 0xffffffffffffffff
push 0x41855c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
mov dword [esp + 0x24], edi
mov dword [edi + 0x10], ebp
mov byte [edi + 0x14], 1
mov byte [edi + 0x15], 1
mov eax, dword [edi + 0x18]
cmp eax, dword [edi + 0x1c]
je 0x41286a
mov ecx, dword [edi + 0x24]
mov eax, dword [edi + 0x28]
lea esi, [edi + 0x24]
cmp ecx, eax
jne 0x412afe
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x32]
mov word [esp + 0x30], bp
rep stosd dword es:[edi], eax
lea edx, [esp + 0x30]
push 0x104
push edx
push ebp
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x2b]
lea ecx, [esp + 0x18]
push eax
mov dword [esp + 0x244], ebp
call fcn.004040a0
xor ecx, ecx
cmp word [esp + 0x30], bp
mov byte [esp + 0x240], 1
je 0x4128c2
lea eax, [esp + 0x30]
add eax, 2
inc ecx
cmp word [eax], bp
jne 0x4128b9
lea ecx, [esp + ecx*2 + 0x30]
lea edx, [esp + 0x30]
push ecx
push edx
lea ecx, [esp + 0x20]
call fcn.0040ea00
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
sub eax, ecx
mov byte [esp + 0x240], 3
sar eax, 1
cmp eax, 1
mov dword [esp + 0x10], 0xffffffff
jb 0x412969
dec eax
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
lea eax, [esp + 0x10]
ja 0x412908
lea eax, [esp + 0xc]
mov eax, dword [eax]
mov word [esp + 0xc], 0x5c
lea edx, [esp + 0xc]
lea esi, [ecx + eax*2 + 2]
mov ecx, dword [esp + 0xc]
push ecx
push edx
lea ecx, [esp + 0x20]
call fcn.0040e350
push ecx
mov ecx, esp
push eax
call fcn.0040e390
push esi
lea ecx, [esp + 0x1c]
call fcn.00411350
push ecx
mov ecx, esp
push eax
call fcn.0040e390
lea eax, [esp + 0x38]
push eax
call fcn.00411410
mov ecx, dword [eax]
mov eax, dword [esp + 0x28]
add esp, 0x10
cmp ecx, eax
je 0x412969
sub ecx, eax
sub ecx, 2
sar ecx, 1
mov edi, ecx
cmp edi, 0xffffffff
jne 0x412997
lea ecx, [esp + 0x18]
mov dword [esp + 0x240], 4
call fcn.00403350
xor al, al
mov ecx, dword [esp + 0x238]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebp
add esp, 0x238
ret
mov ecx, dword [esp + 0x24]
mov esi, dword [ecx + 0x1c]
lea edx, [ecx + 0x18]
mov ecx, dword [ecx + 0x18]
cmp ecx, esi
jne 0x4129db
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], edi
sub ecx, eax
sar ecx, 1
mov dword [esp + 0xc], ecx
cmp ecx, edi
lea ecx, [esp + 0xc]
jb 0x4129c4
lea ecx, [esp + 0x10]
mov ecx, dword [ecx]
lea esi, [esp + 0x17]
push esi
lea ecx, [eax + ecx*2]
push ecx
push eax
mov ecx, edx
call fcn.00407e90
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + 0x24]
lea esi, [edx + 0x24]
mov edx, dword [edx + 0x28]
cmp ecx, edx
jne 0x412ae6
mov edx, dword [esp + 0x1c]
mov ecx, edx
sub ecx, eax
sar ecx, 1
mov ebp, ecx
sub ebp, edi
dec ebp
inc edi
cmp edi, ecx
mov dword [esp + 0x10], ebp
jbe 0x412a1d
push str.basic_string
call fcn.00410540
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
add esp, 4
sub edx, eax
lea ecx, [esp + 0xc]
sar edx, 1
sub edx, edi
cmp edx, ebp
mov dword [esp + 0xc], edx
jb 0x412a33
lea ecx, [esp + 0x10]
mov edx, dword [ecx]
add edx, edi
lea ecx, [eax + edx*2]
lea edx, [esp + 0x17]
lea eax, [eax + edi*2]
push edx
push ecx
push eax
mov ecx, esi
call fcn.00407e90
mov ecx, dword [esi]
mov eax, dword [esi + 4]
sub eax, ecx
mov dword [esp + 0xc], 0xffffffff
sar eax, 1
cmp eax, 1
jb 0x412ae6
dec eax
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
lea eax, [esp + 0xc]
ja 0x412a77
lea eax, [esp + 0x10]
mov eax, dword [eax]
mov word [esp + 0xc], 0x2e
lea edx, [esp + 0x2c]
lea edi, [ecx + eax*2 + 2]
mov ecx, dword [esp + 0xc]
push ecx
push edx
mov ecx, esi
call fcn.0040e350
push ecx
mov ecx, esp
push eax
call fcn.0040e390
push edi
lea ecx, [esp + 0x18]
call fcn.00411350
push ecx
mov ecx, esp
push eax
call fcn.0040e390
lea eax, [esp + 0x1c]
push eax
call fcn.00411410
mov edi, dword [eax]
add esp, 0x10
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.0040e350
cmp edi, dword [eax]
je 0x412ae6
sub edi, dword [esi]
sub edi, 2
sar edi, 1
cmp edi, 0xffffffff
je 0x412ae6
push 0xffffffffffffffff
push edi
mov ecx, esi
call fcn.00413ba0
lea ecx, [esp + 0x18]
mov dword [esp + 0x240], 0xffffffff
call fcn.00403350
mov edi, dword [esp + 0x24]
mov edx, dword [edi + 0x18]
mov eax, dword [edi + 0x1c]
cmp edx, eax
je 0x41297d
mov eax, dword [esi]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x41297d
cmp dword [edi + 0x30], 0x1fffffff
jne 0x412b35
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
and eax, 0xffff
mov ecx, edi
push eax
call fcn.00412c50
mov ecx, dword [edi + 0x30]
push ecx
push esi
mov ecx, edi
call fcn.00412d70
jmp 0x41297f