Function at 0x40e120
Capabilities:
Identify system language via api
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a8536
mov eax, dword fs:[0]
push eax
sub esp, 0x144
mov eax, dword [0x61cff8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push ecx
lea ecx, [esi + 0x134]
mov dword [ebp - 0x14], 0xffffffff
call fcn.0040c110
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x40e584
mov ecx, dword [ebx + 0x10]
mov eax, ecx
mov edi, dword [ebx + 0x14]
or eax, edi
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x30], edi
je 0x40e2a9
test edi, edi
jne 0x40e192
test ecx, ecx
je 0x40e399
cmp dword [esi + 0x1c0], 0
jne 0x40e5a4
mov edx, dword [esi + 0x68]
mov dword [ebp - 0x34], edx
cmp edx, 0xffffffff
jne 0x40e1f4
cmp dword [esi + 0xf8], 0
je 0x40e1bc
mov ebx, ecx
mov eax, edi
jmp 0x40e24a
mov ebx, dword [ebx + 4]
xor eax, eax
mov dword [ebp - 0x28], eax
cmp edi, eax
ja 0x40e1d3
jb 0x40e1ce
cmp ecx, ebx
jae 0x40e1d3
mov ebx, ecx
mov dword [ebp - 0x28], edi
mov edx, dword [ebp - 0x24]
lea ecx, [esi + 0x90]
push ebx
push dword [edx]
call fcn.00410cd0
test al, al
je 0x40e42b
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
jmp 0x40e24a
mov ebx, dword [ebx + 4]
xor eax, eax
mov dword [ebp - 0x28], eax
cmp edi, eax
ja 0x40e20d
jb 0x40e206
cmp ecx, ebx
jae 0x40e20d
mov ebx, ecx
mov dword [ebp - 0x28], edi
mov eax, edi
mov edx, dword [ebp - 0x24]
mov edi, ebx
mov edx, dword [edx]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x34]
test ebx, ebx
je 0x40e247
nop
push 0
lea eax, [ebp - 0x18]
push eax
push edi
push dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e606
mov edx, dword [ebp - 0x34]
sub edi, dword [ebp - 0x18]
jne 0x40e220
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
mov edx, dword [esi + 0xf4]
sub ecx, ebx
mov dword [ebp - 0x2c], ecx
sbb edi, eax
add dword [esi + 0x70], ebx
mov dword [ebp - 0x30], edi
adc dword [esi + 0x74], eax
test edx, edx
je 0x40e28c
push dword [esi + 0x4c]
mov eax, dword [edx]
mov ecx, edx
push dword [esi + 0x48]
push dword [esi + 0x7c]
push dword [esi + 0x78]
push dword [esi + 0x84]
push dword [esi + 0x80]
push dword [esi + 0x74]
push dword [esi + 0x70]
call dword [eax + 8]
mov ecx, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x24]
test edi, edi
ja 0x40e192
jb 0x40e2a1
test ecx, ecx
jne 0x40e192
mov ebx, dword [ebp - 0x24]
jmp 0x40e399
mov ebx, dword [esi + 0x68]
cmp ebx, 0xffffffff
jne 0x40e327
cmp dword [esi + 0xf8], 0
mov ebx, dword [ebp - 0x24]
push dword [ebx + 8]
push dword [ebx]
je 0x40e2f2
push dword [esi + 0x74]
push dword [esi + 0x70]
push dword [esi + 0x100]
call dword [0x628c90]
add esp, 0x14
test eax, eax
jns 0x40e358
push 0x11
push str.VBox::Write_Error
lea ecx, [esi + 0x1c4]
call fcn.0040f000
jmp 0x40e584
lea ecx, [esi + 0x90]
call fcn.00410cd0
test al, al
jne 0x40e358
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 0x10
jne 0x40e6a0
call fcn.00410110
jmp 0x40e6a5
mov edx, dword [ebp - 0x24]
mov edi, dword [edx + 8]
mov eax, dword [edx]
mov dword [ebp - 0x1c], eax
test edi, edi
je 0x40e355
push 0
lea ecx, [ebp - 0x20]
push ecx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40e7c0
mov eax, dword [ebp - 0x1c]
sub edi, dword [ebp - 0x20]
jne 0x40e336
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebx + 8]
add dword [esi + 0x70], eax
mov ecx, dword [esi + 0xf4]
adc dword [esi + 0x74], 0
mov eax, dword [ebx + 8]
add dword [esi + 0x78], eax
adc dword [esi + 0x7c], 0
test ecx, ecx
je 0x40e399
push dword [esi + 0x4c]
mov eax, dword [ecx]
push dword [esi + 0x48]
push dword [esi + 0x7c]
push dword [esi + 0x78]
push dword [esi + 0x84]
push dword [esi + 0x80]
push dword [esi + 0x74]
push dword [esi + 0x70]
call dword [eax + 8]
mov dword [ebx + 8], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebp - 0x1c], ebx
lea ebx, [esi + 0x10c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x124]
lea eax, [ebp - 0x1c]
push eax
push dword [edi + 4]
push edi
call fcn.00408920
mov edx, eax
mov ecx, 0x15555554
mov eax, dword [esi + 0x128]
sub ecx, eax
cmp ecx, 1
jb 0x40e5fc
lea ecx, [eax + 1]
mov dword [esi + 0x128], ecx
mov dword [edi + 4], edx
mov eax, dword [edx + 4]
push ebx
mov dword [eax], edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [esi + 0x108]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push ecx
lea ecx, [esi + 0x134]
call fcn.0040c110
mov ebx, eax
mov dword [ebp - 0x24], eax
test ebx, ebx
jne 0x40e170
jmp 0x40e584
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 0x10
jne 0x40e44a
call fcn.00410110
jmp 0x40e44f
call fcn.004102c0
mov edx, eax
cmp word [edx], 0
jne 0x40e45b
xor ecx, ecx
jmp 0x40e46f
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e460
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x1c4]
call fcn.0040f000
lea ecx, [ebp - 0x4c]
call fcn.00410470
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esi + 0x1c4]
mov dword [ebp - 4], 0
call fcn.0040ecc0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, 8
jb 0x40e4b7
inc eax
lea ecx, [ebp - 0x4c]
push eax
push dword [ebp - 0x4c]
call fcn.0040b950
mov eax, dword [esi + 0xac]
test eax, eax
je 0x40e581
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40e581
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0xac]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40e581
cmp dword [esi + 0xe4], 0
je 0x40e581
cmp dword [esi + 0xe8], 0x10
lea eax, [esi + 0xd4]
jb 0x40e50f
mov eax, dword [eax]
lea ecx, [ebp - 0x14c]
push 3
mov dword [ebp - 0x150], ecx
lea ecx, [ebp - 0x150]
push eax
call fcn.0040eac0
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x150]
cmp word [edx], 0
jne 0x40e540
xor ecx, ecx
jmp 0x40e554
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e545
sub ecx, ebx
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x1c4]
call fcn.0040eb90
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14c]
mov eax, dword [ebp - 0x150]
cmp eax, ecx
je 0x40e581
push eax
call fcn.00586a7b
add esp, 4
mov ebx, dword [ebp - 0x24]
mov dword [esi + 0x1c0], 1
push dword [esi + 0x138]
mov dword [esi + 0x15c], 1
call dword [sym.imp.KERNEL32.dll_SetEvent]
test ebx, ebx
je 0x40e847
mov dword [ebx + 8], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0
mov dword [ebp - 0x20], ebx
lea ebx, [esi + 0x10c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x124]
lea eax, [ebp - 0x20]
push eax
push dword [edi + 4]
push edi
call fcn.00408920
mov ecx, eax
mov edx, 0x15555554
mov eax, dword [esi + 0x128]
sub edx, eax
cmp edx, 1
jae 0x40e825
push str.list_T__too_long
call fcn.0057f84e
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 0x10
jne 0x40e625
call fcn.00410110
jmp 0x40e62a
call fcn.004102c0
mov edx, eax
cmp word [edx], 0
jne 0x40e636
xor ecx, ecx
jmp 0x40e64f
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e640
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x1c4]
call fcn.0040f000
lea ecx, [ebp - 0x4c]
call fcn.00410470
mov dword [ebp - 4], 2
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esi + 0x1c4]
call fcn.0040ecc0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, 8
jb 0x40e581
inc eax
lea ecx, [ebp - 0x4c]
push eax
push dword [ebp - 0x4c]
call fcn.0040b950
jmp 0x40e581
call fcn.004102c0
mov edx, eax
cmp word [edx], 0
jne 0x40e6b1
xor ecx, ecx
jmp 0x40e6c5
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e6b6
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x1c4]
call fcn.0040f000
lea ecx, [ebp - 0x4c]
call fcn.00410470
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esi + 0x1c4]
mov dword [ebp - 4], 3
call fcn.0040ecc0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
cmp eax, 8
jb 0x40e70d
inc eax
lea ecx, [ebp - 0x4c]
push eax
push dword [ebp - 0x4c]
call fcn.0040b950
mov eax, dword [esi + 0xac]
test eax, eax
je 0x40e584
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40e584
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0xac]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x40e584
cmp dword [esi + 0xe4], 0
je 0x40e584
cmp dword [esi + 0xe8], 0x10
lea eax, [esi + 0xd4]
jb 0x40e765
mov eax, dword [eax]
lea ecx, [ebp - 0x14c]
push 3
mov dword [ebp - 0x150], ecx
lea ecx, [ebp - 0x150]
push eax
call fcn.0040eac0
mov dword [ebp - 4], 4
lea ecx, [esi + 0x1c4]
push dword [ebp - 0x150]
call fcn.0040e9c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14c]
mov eax, dword [ebp - 0x150]
cmp eax, ecx
je 0x40e584
push eax
call fcn.00586a7b
add esp, 4
jmp 0x40e584
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov ecx, 0x804
movzx eax, ax
cmp ax, cx
mov ecx, 0x10
jne 0x40e7df
call fcn.00410110
jmp 0x40e7e4
call fcn.004102c0
mov edx, eax
cmp word [edx], 0
jne 0x40e7f0
xor ecx, ecx
jmp 0x40e804
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e7f5
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esi + 0x1c4]
call fcn.0040f000
lea ecx, [ebp - 0x4c]
call fcn.00410470
mov dword [ebp - 4], 5
jmp 0x40e66b
inc eax
mov dword [esi + 0x128], eax
mov dword [edi + 4], ecx
mov eax, dword [ecx + 4]
push ebx
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [esi + 0x108]
call dword [sym.imp.KERNEL32.dll_SetEvent]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057e2f0
mov esp, ebp
pop ebp
ret