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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42cc5a
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x4424f8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [esi + 0x20]
mov dword [ebp - 0x20], ecx
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::Empty]
mov eax, dword [esi + 4]
mov ecx, 0x436e08
test al, 0x40
je 0x41f019
mov ecx, 0x436e00
jmp 0x41f022
test al, 0x20
je 0x41f022
mov ecx, 0x436df8
mov eax, dword [ebp + 8]
push ecx
push eax
mov dword [esi], 0
call dword [sym.imp.MSVCR100.dll__wfopen]
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x41f057
mov ecx, esi
call fcn.0041ac50
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 4]
xor edi, edi
mov byte [ebp - 0xd], 1
mov dword [esi + 0x18], 1
test cl, 0x10
je 0x41f23e
mov ebx, dword [sym.imp.MSVCR100.dll_fseek]
push 2
push edi
push eax
call ebx
mov ecx, dword [esi]
push ecx
call dword [sym.imp.MSVCR100.dll_ftell]
mov edx, dword [esi]
push edi
push edi
push edx
mov dword [esi + 0x10], eax
call ebx
mov eax, dword [esi + 0x10]
mov ebx, 0x400
add esp, 0x1c
cmp eax, ebx
jge 0x41f0a8
mov ebx, eax
test ebx, ebx
je 0x41f2e1
push ebx
call sub.mfc100u.dll_new__
mov ecx, dword [esi]
push ecx
push 1
push ebx
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x14
cmp eax, 1
sete al
mov byte [ebp - 0xd], al
test al, al
je 0x41f22d
and dword [esi + 4], 0xfffffffa
mov dword [ebp - 0x14], edi
cmp dword [0x442838], edi
je 0x41f14e
xor eax, eax
mov ecx, dword [eax + 0x44283c]
test ecx, ecx
jle 0x41f10d
cmp edi, ebx
jge 0x41f10d
mov ecx, dword [ebp - 0x18]
mov cl, byte [ecx + edi]
mov edx, dword [eax + 0x442838]
cmp cl, byte [edi + edx]
mov ecx, dword [eax + 0x44283c]
jne 0x41f10d
inc edi
cmp edi, ecx
jl 0x41f0ed
mov eax, dword [ebp - 0x14]
cmp edi, ecx
je 0x41f127
inc eax
mov dword [ebp - 0x14], eax
xor edi, edi
shl eax, 4
cmp dword [eax + 0x442838], edi
jne 0x41f0e3
jmp 0x41f14e
shl eax, 4
mov edx, dword [eax + 0x442844]
or edx, dword [esi + 4]
mov dword [esi + 4], edx
cmp edi, 2
jne 0x41f13e
mov dword [esi + 0x18], edi
mov eax, dword [eax + 0x442840]
push eax
lea ecx, [esi + 0x24]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
cmp ebx, edi
jle 0x41f161
mov ecx, dword [esi]
push 0
push edi
push ecx
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
test edi, edi
jne 0x41f20e
lea ecx, [ebp - 0x14]
call dword [0x42f90c]
mov edx, dword [ebp - 0x18]
push ebx
push edx
push ecx
mov eax, esp
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], esp
mov dword [eax], str.UTF_8
call fcn.0041a410
push ebx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer]
push ecx
mov ecx, esp
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x1c], esp
mov dword [ecx], str.UTF_16
push eax
lea ecx, [ebp - 0x38]
call fcn.0041b790
push eax
lea ecx, [ebp - 0x14]
call dword [sym.imp.mfc100u.dll_ATL::CSimpleStringT_wchar_t_1_::ReleaseBuffer]
push ecx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], esp
mov eax, esp
lea edx, [ebp - 0x1c]
push edx
mov dword [eax], ecx
call fcn.0041c620
add esp, 8
push eax
lea ecx, [esi + 0x24]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_1]
lea ecx, [ebp - 0x1c]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x34]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x38]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_cla]
mov eax, dword [esi + 0x24]
cmp dword [eax - 0xc], 0
lea ecx, [esi + 0x24]
jne 0x41f22d
mov edx, dword [ebp - 0x18]
cmp byte [edx], 0x3c
jne 0x41f22d
push str.UTF_8
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
mov eax, dword [ebp - 0x18]
push eax
call sub.mfc100u.dll_delete__
add esp, 4
jmp 0x41f2d7
test cl, 0x20
je 0x41f2e1
test cl, 0x40
je 0x41f266
push 2
push 0
push eax
call dword [sym.imp.MSVCR100.dll_fseek]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.MSVCR100.dll_ftell]
add esp, 0x10
mov dword [esi + 0x10], eax
xor ecx, ecx
cmp dword [0x442838], ecx
je 0x41f2e1
mov edx, dword [esi + 4]
xor eax, eax
test dword [eax + 0x442844], edx
jne 0x41f28d
inc ecx
mov eax, ecx
shl eax, 4
cmp dword [eax + 0x442838], edi
jne 0x41f275
jmp 0x41f2e1
shl ecx, 4
mov ebx, ecx
mov edi, dword [ebx + 0x44283c]
cmp edi, 2
jne 0x41f2a0
mov dword [esi + 0x18], edi
mov edx, dword [ebx + 0x442840]
push edx
lea ecx, [esi + 0x24]
call dword [sym.imp.mfc100u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_2]
cmp dword [esi + 0x10], 0
je 0x41f2ba
xor edi, edi
jmp 0x41f2e1
mov eax, dword [esi]
mov ecx, dword [ebx + 0x442838]
push eax
push 1
push edi
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
cmp eax, 1
sete byte [ebp - 0xd]
cmp byte [ebp - 0xd], 0
je 0x41f03c
test byte [esi + 4], 0x40
je 0x41f2ef
mov edx, dword [esi + 0x10]
mov dword [esi + 0x14], edx
jmp 0x41f2f2
mov dword [esi + 0x14], edi
test edi, edi
je 0x41f320
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov eax, esp
mov dword [ebp - 0x18], esp
push ecx
mov dword [eax], 0
mov eax, esp
mov dword [eax], 0x436df0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], esp
push eax
call fcn.0041ee40
add esp, 0x18
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4