Function at 0x406b40
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x46eb90
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x483390]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov dword [esp + 0x48], 1
mov eax, dword [0x4863c4]
mov edx, dword [eax + 0xc]
mov ecx, 0x4863c4
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x20], ebp
mov byte [esp + 0x48], 2
mov eax, dword [0x4863c4]
mov edx, dword [eax + 0xc]
mov ecx, 0x4863c4
call edx
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov byte [esp + 0x48], 3
mov eax, dword [0x4863c4]
mov edx, dword [eax + 0xc]
mov ecx, 0x4863c4
call edx
lea edi, [eax + 0x10]
mov dword [esp + 0x28], edi
push 0
push 0x80
push 3
push 0
push 1
mov byte [esp + 0x5c], 4
mov eax, dword [esp + 0x64]
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406cc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_file__error__d__n
push 0x80
call fcn.00431310
lea eax, [edi - 0x10]
add esp, 0xc
mov byte [esp + 0x48], 3
lea ecx, [eax + 0xc]
or edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c21
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [esp + 0x48], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c42
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x48], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c63
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x48], 0
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406c88
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x48], 0xffffffff
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406cb0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
lea ecx, [esp + 0x34]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x24], eax
inc eax
push eax
call fcn.00441dab
mov edx, dword [esp + 0x28]
add esp, 4
inc edx
push edx
mov edi, eax
push 0
push edi
call fcn.00446e10
mov ecx, dword [esp + 0x30]
add esp, 0xc
push 0
lea eax, [esp + 0x28]
push eax
push ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406d4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_read_from_file__error__d__n
push 0x80
call fcn.00431310
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x48], 3
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x406c15
push edi
push 0x473ab0
lea edi, [esp + 0x28]
call fcn.004035e0
mov ebp, dword [esp + 0x28]
mov eax, dword [ebp - 0xc]
add esp, 8
test eax, eax
jge 0x406d6f
or eax, 0xffffffff
jmp 0x406d88
push str._INSTALLPATH_
push ebp
call fcn.00442f26
add esp, 8
test eax, eax
jne 0x406d86
or eax, 0xffffffff
jmp 0x406d88
sub eax, ebp
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x20]
call fcn.00404c90
lea ebx, [esp + 0x18]
mov byte [esp + 0x48], 5
call fcn.00403260
mov byte [esp + 0x48], 4
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406dc8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x18]
cmp dword [edi - 0xc], 0
jge 0x406dd7
or ecx, 0xffffffff
jmp 0x406df2
push str.__LANG_
push edi
call fcn.00442f26
add esp, 8
test eax, eax
jne 0x406dee
or ecx, 0xffffffff
jmp 0x406df2
sub eax, edi
mov ecx, eax
mov eax, dword [edi - 0xc]
sub eax, ecx
sub eax, 7
lea ecx, [esp + 0x30]
lea edx, [esp + 0x18]
call fcn.00404c20
lea ebx, [esp + 0x18]
mov byte [esp + 0x48], 6
call fcn.00403260
mov byte [esp + 0x48], 4
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406e3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x50]
push 0
push 0
push 2
push 0
push 2
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x406eb0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_open_file__error__d_
push 0x80
call fcn.00431310
mov byte [esp + 0x54], 3
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
add esp, 0xc
lea edx, [eax + 0xc]
or ecx, esi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406e9f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x48], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
jmp 0x406c29
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x28
push str.__xml_version_1.0__encoding_gb2312____n
push esi
call ebx
push 0
lea edx, [esp + 0x20]
push edx
push 8
push str._SETUP__n
push esi
call ebx
mov eax, dword [0x4863c4]
mov edx, dword [eax + 0xc]
mov ecx, 0x4863c4
call edx
add eax, 0x10
mov dword [esp + 0x2c], eax
mov byte [esp + 0x48], 7
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
push str._LANG__d__LANG_
lea edi, [esp + 0x34]
call fcn.004035e0
mov edi, dword [esp + 0x34]
mov eax, dword [edi - 0xc]
add esp, 8
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
push edi
push esi
call ebx
mov ebp, dword [esp + 0x18]
mov eax, ebp
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x406f27
push 0
lea edx, [esp + 0x20]
push edx
sub eax, ecx
push eax
push ebp
push esi
call ebx
push 0
lea eax, [esp + 0x20]
push eax
push 0xd
push str._INSTALLPATH_
push esi
call ebx
mov ebp, dword [esp + 0x54]
mov eax, ebp
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x406f56
push 0
sub eax, ecx
lea ecx, [esp + 0x20]
push ecx
push eax
push ebp
push esi
call ebx
push 0
lea edx, [esp + 0x20]
push edx
push 0x17
push str.__INSTALLPATH__n__SETUP_
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [edi - 0x10]
mov byte [esp + 0x48], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406fa4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x48], 3
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406fc9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x48], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406fee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x48], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407013
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x48], 0
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407038
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x48], 0xffffffff
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407060
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret