Function at 0x403610
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x40777b
push eax
mov eax, 0x1858
mov dword fs:[0], esp
call fcn.004072d0
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x187c]
lea eax, [esp + 0x868]
mov esi, ecx
push edi
push eax
mov dword [esp + 0x28], esi
call sub.MSVCRT.dll_wcscpy
lea ecx, [esp + 0x870]
push ecx
call sub.MSVCRT.dll__wcslwr
push 0x40a0ac
push edi
call sub.MSVCRT.dll_wcscmp
mov ebx, dword [0x40af4c]
mov ecx, dword [0x40af50]
mov edi, eax
add esp, 0x14
neg edi
sbb edi, edi
mov eax, 0xc
inc edi
cmp ebx, ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
je 0x403924
mov ebp, dword [ebx]
lea edx, [esp + 0x1068]
push ebp
push edx
call sub.MSVCRT.dll_wcscpy
lea eax, [esp + 0x1070]
push eax
call sub.MSVCRT.dll__wcslwr
add esp, 0xc
test edi, edi
jne 0x4036d9
lea ecx, [esp + 0x868]
lea edx, [esp + 0x1068]
push ecx
push edx
call sub.MSVCRT.dll_wcsstr
add esp, 8
test eax, eax
je 0x4038cc
mov eax, dword [ebp + 0x400]
mov ecx, dword [esi + 4]
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1c], 0
call fcn.00402f30
mov edx, dword [esi + 0x14]
lea ecx, [esp + 0x3c]
push edx
mov dword [esp + 0x1874], 0
call fcn.004030b0
xor eax, eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x24], eax
lea edx, [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
push eax
mov dword [esp + 0x34], eax
mov eax, dword [esi + 4]
push ecx
push 0x10
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4038b8
mov ecx, dword [esp + 0x28]
push ecx
call sub.MFC42u.DLL_operatornew
mov ecx, dword [esp + 0x2c]
mov ebx, eax
mov edx, ecx
xor eax, eax
mov edi, ebx
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi + 4]
lea eax, [esp + 0x20]
push eax
push ecx
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4038a3
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x2c]
push 5
push ecx
lea ecx, [esp + 0x44]
mov dword [esp + 0x40], eax
call fcn.00403040
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x38]
push edx
push ebx
push eax
lea ecx, [esp + 0x48]
call fcn.00402fc0
test eax, eax
jne 0x4038a3
mov ecx, 0x200
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x1878]
lea edx, [esp + 0x68]
push ecx
push edx
call sub.MSVCRT.dll_wcscpy
mov eax, dword [esp + 0x1888]
add esp, 8
test eax, eax
jne 0x4037ed
mov eax, ebp
push eax
lea eax, [esp + 0x6c]
push eax
call sub.MSVCRT.dll_wcscat
add esp, 8
lea ecx, [esp + 0x68]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4038e2
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
xor edi, edi
lea edx, [esp + 0x34]
push edi
push edx
push eax
push ecx
push esi
mov dword [esp + 0x48], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x20]
lea edx, [esp + 0x58]
lea eax, [ebp + 0x404]
push edx
push eax
mov ecx, edi
call fcn.004048a0
lea ecx, [esp + 0x60]
add ebp, 0x414
push ecx
push ebp
mov ecx, edi
call fcn.004048a0
lea edx, [esp + 0x60]
lea eax, [esp + 0x58]
push edx
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x403897
push ebx
call sub.MFC42u.DLL_operatordelete
add esp, 4
xor ebx, ebx
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40390c
mov esi, dword [esp + 0x20]
test ebx, ebx
je 0x4038b0
push ebx
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1870], 0xffffffff
call fcn.00402f70
mov eax, dword [0x40af50]
add ebx, 4
cmp ebx, eax
mov dword [esp + 0x10], ebx
jne 0x403695
jmp 0x403920
test ebx, ebx
mov esi, 2
je 0x4038f4
push ebx
call sub.MFC42u.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1870], 0xffffffff
call fcn.00402f70
mov eax, esi
jmp 0x403924
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1870], 0xffffffff
call fcn.00402f70
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1868]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1864
ret 0xc