Function at 0x4023b0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x409710
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x11b4
call fcn.00409490
mov eax, dword [ebp + 0x18]
push ebx
push esi
push edi
test eax, eax
mov dword [ebp - 0x10], esp
jne 0x4023eb
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402576
mov esi, dword [ebp + 0xc]
lea edi, [ebp - 0x54]
mov ebx, 0xb
push esi
call fcn.00401fd0
mov word [edi], ax
add esp, 4
add esi, 6
add edi, 2
dec ebx
jne 0x4023f6
lea eax, [ebp - 0x54]
push eax
call fcn.004023a0
lea ecx, [ebp - 0x4e]
lea edx, [ebp - 0x24]
push ecx
push edx
mov dword [ebp - 0x24], 0x3039
mov dword [ebp - 0x20], 0xd431
call fcn.00402270
lea eax, [ebp - 0x4e]
lea ecx, [ebp - 0x24]
push eax
push ecx
call fcn.00402300
mov eax, dword [ebp + 0x18]
add esp, 0x14
test eax, eax
jle 0x4024df
mov edx, dword [ebp + 0x14]
lea esi, [ebp - 0x11c4]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x3c4]
lea ecx, [ebp - 0x2c4]
push eax
push ecx
push esi
call fcn.00402020
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x3c4]
push edx
push esi
mov ecx, dword [eax]
push ecx
call fcn.00402710
fstp st(0)
add esp, 0x18
mov edi, esi
mov ebx, 0x40
lea edx, [ebp - 0x4e]
push edx
push edi
call fcn.00402270
add esp, 8
add edi, 8
dec ebx
jne 0x40248c
add esi, 0x180
mov ebx, 4
mov ecx, dword [0x40e234]
lea eax, [ebp - 0x54]
push eax
push esi
push ecx
call fcn.00408e40
add esp, 0xc
sub esi, 0x80
dec ebx
jne 0x4024aa
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add ecx, 4
dec eax
mov dword [ebp - 0x18], ecx
mov esi, edi
mov dword [ebp - 0x14], eax
jne 0x402459
lea edx, [ebp - 0x264]
push 0x100
xor esi, esi
push edx
push esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x9c4]
lea ecx, [ebp - 0x7c4]
push eax
lea edx, [ebp - 0x5c4]
push ecx
lea eax, [ebp - 0x2c]
push edx
lea ecx, [ebp - 0x264]
push eax
push ecx
call dword [sym.imp.msvcrt.dll__wsplitpath]
mov edx, dword [ebp + 0xc]
add esp, 0x14
cmp word [edx + 0x42], 0x41
push 0x40d424
jne 0x402533
push 0x40d414
jmp 0x402538
push 0x40d408
lea eax, [ebp - 0x5c4]
lea ecx, [ebp - 0x2c]
push eax
lea edx, [ebp - 0x264]
push ecx
push edx
call dword [sym.imp.msvcrt.dll__wmakepath]
add esp, 0x14
lea eax, [ebp - 0x264]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40258e
cmp dword [ebp + 0x10], esi
je 0x40258e
push esi
push esi
push 0x40d3f8
call sub.mfc42u.dll_AfxMessageBox
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp + 0x10]
xor edi, edi
cmp eax, esi
mov dword [ebp - 0x14], edi
mov dword [ebp + 0xc], esi
mov dword [ebp - 4], esi
je 0x40264a
lea ecx, [ebp - 0x264]
push esi
push ecx
lea ecx, [ebp - 0x64]
call sub.mfc42u.dll_CFile::CFile
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 1
call sub.mfc42u.dll_CFile::GetLength
mov ebx, dword [ebp + 0x14]
mov dword [ebx + 0xc], eax
cdq
and edx, 7
add eax, edx
sar eax, 3
lea eax, [eax*8 + 8]
push eax
mov dword [ebp + 0xc], eax
call sub.mfc42u.dll_operatornew
mov edx, dword [ebx + 0xc]
add esp, 4
mov edi, eax
lea ecx, [ebp - 0x64]
push edx
push edi
mov dword [ebp - 0x14], edi
call sub.mfc42u.dll_CFile::Read
lea ecx, [ebp - 0x64]
call sub.mfc42u.dll_CFile::Close
cmp dword [ebp + 0x18], esi
jne 0x40261d
mov eax, dword [ebp + 0xc]
shr eax, 2
cmp esi, eax
jae 0x40263c
lea ecx, [edi + esi*4]
push ebx
push ecx
call fcn.00402270
add esp, 8
add esi, 2
jmp 0x402601
mov edx, dword [ebp + 0xc]
shr edx, 2
cmp esi, edx
jae 0x40263c
lea eax, [ebp - 0x4e]
lea ecx, [edi + esi*4]
push eax
push ecx
call fcn.00402270
add esp, 8
add esi, 2
jmp 0x40261d
lea ecx, [ebp - 0x64]
mov byte [ebp - 4], 0
call fcn.00409158
jmp 0x40264d
mov ebx, dword [ebp + 0x14]
mov edx, dword [ebp + 8]
push 0x1001
lea ecx, [ebp - 0x3c]
mov eax, dword [edx]
push eax
call sub.mfc42u.dll_CFile::CFile
push 0x10
push ebx
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 2
call sub.mfc42u.dll_CFile::Write
xor esi, esi
cmp esi, dword [ebp + 0x18]
jge 0x402693
mov eax, esi
push 0x200
shl eax, 9
lea ecx, [ebp + eax - 0x11c4]
push ecx
lea ecx, [ebp - 0x3c]
call sub.mfc42u.dll_CFile::Write
inc esi
jmp 0x402671
test edi, edi
je 0x4026a4
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x3c]
push edx
push edi
call sub.mfc42u.dll_CFile::Write
lea ecx, [ebp - 0x3c]
call sub.mfc42u.dll_CFile::Close
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0
call fcn.00409158
test edi, edi
mov dword [ebp - 4], 0xffffffff
je 0x4026cc
push edi
call sub.mfc42u.dll_operatordelete
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x14