Function at 0x405a40
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x432846
mov eax, dword fs:[0]
push eax
sub esp, 0x9e0
mov eax, dword [0x4430a0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x994], eax
lea eax, [ebp - 0x810]
push 0x800
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xorps xmm0, xmm0
mov dword [ebp - 0x818], 0
lea ecx, [ebp - 0x810]
mov dword [ebp - 0x814], 0
movups xmmword [ebp - 0x828], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405ab1
sub ecx, edx
lea eax, [ebp - 0x810]
push ecx
push eax
lea ecx, [ebp - 0x828]
call fcn.004010d0
cmp dword [ebp - 0x814], 0x10
lea esi, [ebp - 0x828]
mov edi, dword [ebp - 0x818]
cmovae esi, dword [ebp - 0x828]
mov dword [ebp - 4], 0
test edi, edi
je 0x405b58
push 0x5c
lea eax, [ebp - 0x984]
push 0
push eax
call fcn.0040ff90
push 0xa3
lea eax, [ebp - 0x927]
push 0
push eax
call fcn.0040ff90
or ecx, 0xffffffff
mov byte [ebp - 0x928], 1
lea eax, [edi - 1]
add esp, 0x18
cmp eax, ecx
cmovb ecx, eax
movzx eax, byte [ecx + esi]
add ecx, esi
mov al, byte [ebp + eax - 0x984]
test al, al
jne 0x405b54
nop dword [eax + eax]
cmp ecx, esi
je 0x405b58
movzx eax, byte [ecx - 1]
dec ecx
mov al, byte [ebp + eax - 0x984]
test al, al
je 0x405b40
sub ecx, esi
jmp 0x405b5b
or ecx, 0xffffffff
cmp edi, ecx
mov dword [ebp - 0x874], 0
lea eax, [ebp - 0x828]
mov dword [ebp - 0x870], 0
cmovb ecx, edi
xorps xmm0, xmm0
cmp dword [ebp - 0x814], 0x10
push ecx
cmovae eax, dword [ebp - 0x828]
lea ecx, [ebp - 0x884]
push eax
movups xmmword [ebp - 0x884], xmm0
call fcn.004010d0
mov ecx, dword [ebp - 0x814]
cmp ecx, 0x10
jb 0x405bd9
mov edx, dword [ebp - 0x828]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405bcf
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40600f
push ecx
push edx
call fcn.0040e532
add esp, 8
movups xmm0, xmmword [ebp - 0x884]
mov eax, 0x7fffffff
movups xmmword [ebp - 0x828], xmm0
movq xmm0, qword [ebp - 0x874]
movq qword [ebp - 0x818], xmm0
mov ecx, dword [ebp - 0x818]
sub eax, ecx
mov dword [ebp - 0x990], ecx
cmp eax, 0x12
jb 0x40600a
cmp dword [ebp - 0x814], 0x10
lea eax, [ebp - 0x828]
mov esi, 0xf
mov dword [ebp - 0x830], 0
cmovae eax, dword [ebp - 0x828]
lea edi, [ebp - 0x840]
mov dword [ebp - 0x98c], eax
xorps xmm0, xmm0
lea eax, [ecx + 0x12]
mov dword [ebp - 0x82c], 0
mov dword [ebp - 0x988], eax
movups xmmword [ebp - 0x840], xmm0
cmp eax, esi
jbe 0x405ca4
mov esi, eax
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x405c77
mov esi, 0x7fffffff
jmp 0x405c81
mov eax, 0x16
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x840]
call fcn.00402a50
mov ecx, dword [ebp - 0x990]
mov edi, eax
mov eax, dword [ebp - 0x988]
mov dword [ebp - 0x840], edi
push ecx
push dword [ebp - 0x98c]
mov dword [ebp - 0x830], eax
push edi
mov dword [ebp - 0x82c], esi
call fcn.0040fa10
mov ecx, dword [ebp - 0x990]
add esp, 0xc
movups xmm0, xmmword [str.Locale_Remulator_]
movups xmmword [edi + ecx], xmm0
mov ax, word [0x433a40]
mov word [edi + ecx + 0x10], ax
mov byte [edi + ecx + 0x12], 0
mov edi, dword [ebp - 0x994]
lea ecx, [ebp - 0x86c]
push 0
xorps xmm0, xmm0
mov byte [ebp - 4], 1
push 0x433a44
mov eax, dword [edi + 4]
mov dword [ebp - 0x98c], eax
movups xmmword [ebp - 0x86c], xmm0
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x858], 0
call fcn.00401170
mov esi, 1
mov byte [ebp - 4], 2
cmp dword [ebp + 8], esi
jle 0x405d8a
push 1
push 0x433a48
lea ecx, [ebp - 0x86c]
call fcn.004056f0
mov edx, dword [edi + esi*4]
mov eax, edx
lea edi, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405d50
sub eax, edi
lea ecx, [ebp - 0x86c]
sar eax, 1
push eax
push edx
call fcn.004056f0
push 2
push 0x433a4c
lea ecx, [ebp - 0x86c]
call fcn.004056f0
mov edi, dword [ebp - 0x994]
inc esi
cmp esi, dword [ebp + 8]
jl 0x405d32
mov eax, dword [ebp - 0x85c]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040e540
mov edi, dword [ebp - 0x86c]
lea ecx, [ebp - 0x86c]
add esp, 4
mov dword [ebp - 0x988], eax
cmp dword [ebp - 0x858], 8
mov edx, eax
cmovae ecx, edi
sub edx, ecx
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x405dd0
lea eax, [ebp - 0x998]
push eax
push dword [ebp - 0x98c]
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
cmp dword [ebp - 0x998], 6
mov ecx, str.LRHookx32.dll
mov eax, str.LRHookx64.dll
cmovne eax, ecx
lea ecx, [ebp - 0x840]
push 0xd
push eax
call fcn.00402b10
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0x854]
push eax
push str.LRCodePage
mov dword [ebp - 0x854], 0x3a4
mov dword [ebp - 0x850], 0x411
mov dword [ebp - 0x84c], 0x21c
mov dword [ebp - 0x848], 0
mov dword [ebp - 0x844], 1
call esi
lea eax, [ebp - 0x850]
push eax
push str.LRLCID
call esi
lea eax, [ebp - 0x84c]
push eax
push str.LRBIAS
call esi
lea eax, [ebp - 0x848]
push eax
push str.LRHookIME
call esi
lea eax, [ebp - 0x844]
push eax
push str.LRHookLCID
call esi
cmp dword [ebp - 0x82c], 0x10
lea eax, [ebp - 0x840]
push 0
cmovae eax, dword [ebp - 0x840]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x9ec]
movlpd qword [ebp - 0x9d8], xmm0
push eax
lea eax, [ebp - 0x9dc]
movlpd qword [ebp - 0x9d0], xmm0
push eax
push 0
push 0
push 0x4000000
push 0
push 0
push 0
push dword [ebp - 0x988]
movlpd qword [ebp - 0x9c8], xmm0
push 0
movlpd qword [ebp - 0x9c0], xmm0
movlpd qword [ebp - 0x9b8], xmm0
movlpd qword [ebp - 0x9b0], xmm0
movlpd qword [ebp - 0x9a8], xmm0
movlpd qword [ebp - 0x9a0], xmm0
movups xmmword [ebp - 0x9ec], xmm0
mov dword [ebp - 0x9dc], 0x44
call fcn.0040c4e0
mov eax, dword [ebp - 0x858]
cmp eax, 8
jb 0x405f62
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x405f58
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40600f
push ecx
push edi
call fcn.0040e532
add esp, 8
mov ecx, dword [ebp - 0x82c]
cmp ecx, 0x10
jb 0x405f9c
mov edx, dword [ebp - 0x840]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405f92
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40600f
push ecx
push edx
call fcn.0040e532
add esp, 8
mov ecx, dword [ebp - 0x814]
mov dword [ebp - 0x830], 0
mov dword [ebp - 0x82c], 0xf
mov byte [ebp - 0x840], 0
cmp ecx, 0x10
jb 0x405fed
mov edx, dword [ebp - 0x828]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x405fe3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40600f
push ecx
push edx
call fcn.0040e532
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e54e
mov esp, ebp
pop ebp
ret
call fcn.00402a40
call fcn.004130cf
int3