Function at 0x4031cb
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xa044
call fcn.0041ad80
push ebx
push esi
push edi
lea ecx, [ebp - 0x2c]
call fcn.0041740c
push 0x422b44
lea ecx, [ebp - 4]
call fcn.0041aab2
mov eax, dword [ebp - 4]
cmp dword [eax - 8], 0
je 0x403451
lea eax, [ebp - 0xc]
push 1
push eax
lea ecx, [ebp - 4]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
mov esi, 0x42051c
push esi
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
pop ecx
pop ecx
test eax, eax
lea ecx, [ebp - 0xc]
setne bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x403236
push esi
lea ecx, [ebp - 4]
call sub.MFC42.DLL_CString::operator
push str.VDESK_ABCHINA
lea ecx, [ebp - 4]
call sub.MFC42.DLL_CString::operator
push str..CFG
lea ecx, [ebp - 4]
call sub.MFC42.DLL_CString::operator
push 0x420500
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
pop ecx
test ebx, ebx
pop ecx
je 0x403451
and byte [ebp - 0xa044], 0
mov ecx, 0x27ff
xor eax, eax
lea edi, [ebp - 0xa043]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push ebx
push 0xa000
lea eax, [ebp - 0xa044]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, eax
push ebx
mov dword [ebp - 0x10], esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
test esi, esi
je 0x403451
mov eax, esi
push 8
cdq
pop ecx
idiv ecx
test edx, edx
jne 0x403451
push esi
call sub.MFC42.DLL_operatornew
mov ebx, pe_nt_image_headers32
pop ecx
mov dword [ebp - 0xc], eax
mov esi, ebx
xor edi, edi
lea eax, [edi + esi]
cmp eax, dword [ebp - 0x10]
jle 0x4032df
mov esi, dword [ebp - 0x10]
sub esi, edi
push str.EnterSafe_2010Feitian__0
lea eax, [ebp + edi - 0xa044]
push esi
push eax
mov eax, dword [ebp - 0xc]
add eax, edi
push eax
call fcn.0040cc22
add edi, esi
cmp esi, ebx
jge 0x4032d2
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x14]
and dword [ebp - 0x14], 0
push eax
push dword [ebp - 0x10]
push 8
push edi
call fcn.0040cdb2
test al, al
jne 0x403327
push edi
call sub.MFC42.DLL_operatordelete
pop ecx
push 1
pop esi
jmp 0x40342d
push dword [ebp - 0x14]
call sub.MFC42.DLL_operatornew
push dword [ebp - 0x14]
mov esi, eax
push edi
push esi
call sub.MSVCRT.dll_memcpy
push edi
call sub.MFC42.DLL_operatordelete
add esp, 0x14
lea ecx, [ebp - 0x2c]
push esi
call fcn.004175fd
lea ecx, [ebp - 0x44]
call fcn.00401502
lea ecx, [ebp - 0x20]
call fcn.00401502
lea eax, [ebp - 5]
lea ecx, [ebp - 0x38]
push eax
push str.VDESK_CONFIG
call fcn.004020e4
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x2c]
push eax
call fcn.00417720
lea ecx, [ebp - 0x38]
mov edi, eax
call fcn.00416a21
push esi
call sub.MFC42.DLL_operatordelete
test edi, edi
pop ecx
je 0x403441
mov esi, str.USE_VDESK
push esi
call sub.MSVCRT.dll_strlen
pop ecx
add eax, esi
push eax
push esi
lea ecx, [ebp - 0x44]
call fcn.0040372c
lea eax, [ebp - 0x44]
mov ecx, edi
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.00417333
lea ecx, [ebp - 0x20]
cmp eax, ecx
je 0x4033d2
lea ecx, [ebp - 5]
push ecx
lea ecx, [ebp - 0x20]
push dword [eax + 4]
push dword [eax]
call fcn.0040152a
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x30]
sub eax, dword [ebp - 0x38]
push eax
push dword [ebp - 0x38]
call fcn.0040149b
lea eax, [ebp - 0x20]
push 3
push eax
call fcn.00417d18
lea eax, [ebp - 0x20]
push 0x4204c4
push eax
call fcn.004037c5
add esp, 0x10
test al, al
je 0x40341a
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
sub eax, dword [ebp - 0x20]
push eax
push dword [ebp - 0x20]
call fcn.0040149b
xor esi, esi
jmp 0x403425
lea ecx, [ebp - 0x20]
call fcn.00416a21
push 1
pop esi
lea ecx, [ebp - 0x44]
call fcn.00416a21
lea ecx, [ebp - 4]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x2c]
call fcn.00417425
mov eax, esi
jmp 0x403464
lea ecx, [ebp - 0x20]
call fcn.00416a21
lea ecx, [ebp - 0x44]
call fcn.00416a21
lea ecx, [ebp - 4]
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x2c]
call fcn.00417425
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret