Function at 0x402407
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push 2
xor ebx, ebx
push ebx
push dword [ebp + 8]
mov esi, ecx
call fcn.004043d5
add esp, 0xc
test eax, eax
je 0x40242f
mov eax, 0x80004005
jmp 0x4026b4
push edi
push dword [ebp + 8]
call fcn.004042e6
mov edi, eax
pop ecx
cmp edi, ebx
je 0x40252e
lea eax, [edi + 2]
push eax
call fcn.004028c0
mov ecx, dword [esi + 0x20]
push ecx
mov dword [esi + 0x20], eax
call fcn.00402b33
pop ecx
pop ecx
cmp dword [esi + 0x20], ebx
je 0x4026ba
push ebx
push ebx
push dword [ebp + 8]
call fcn.004043d5
add esp, 0xc
test eax, eax
jne 0x40248a
push dword [ebp + 8]
mov eax, dword [esi + 0x20]
push edi
push 1
push eax
call fcn.00404135
add esp, 0x10
cmp eax, edi
je 0x402494
mov eax, 0x80470003
jmp 0x4026b3
mov eax, dword [esi + 0x20]
mov byte [eax + edi + 1], bl
mov eax, dword [esi + 0x20]
mov byte [edi + eax], bl
mov eax, dword [esi + 0x20]
mov dword [ebp - 8], eax
cmp edi, 3
jl 0x4024c3
cmp byte [eax], 0xef
jne 0x4024c3
cmp byte [eax + 1], 0xbb
jne 0x4024c3
cmp byte [eax + 2], 0xbf
jne 0x4024c3
add eax, 3
mov dword [ebp - 8], eax
cmp edi, 2
jl 0x4025ba
mov eax, dword [esi + 0x20]
cmp byte [eax], 0xff
jne 0x4025ba
cmp byte [eax + 1], 0xfe
jne 0x4025ba
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
add eax, 2
push eax
push ebx
push 0xfde9
mov dword [ebp - 8], eax
call edi
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x40252e
push eax
call fcn.004028c0
pop ecx
push ebx
push ebx
push dword [ebp - 0x10]
mov dword [ebp + 8], eax
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push ebx
push 0xfde9
call edi
test eax, eax
jne 0x402538
push dword [ebp + 8]
call fcn.00402b33
pop ecx
mov eax, 0x80004005
jmp 0x4026b3
mov eax, dword [esi + 0x20]
mov ecx, dword [ebp + 8]
push eax
mov dword [esi + 0x20], ecx
call fcn.00402b33
mov eax, dword [esi + 0x20]
push ebx
mov dword [ebp - 8], eax
call fcn.00402b33
pop ecx
pop ecx
jmp 0x4025ba
mov cl, byte [eax]
cmp cl, 0x23
je 0x402696
cmp cl, 0x3b
je 0x402696
push eax
mov edi, 0x40e45c
push edi
call fcn.0040282e
pop ecx
pop ecx
mov dword [ebp + 8], eax
mov cl, byte [eax]
cmp cl, bl
je 0x402696
cmp cl, 0x5b
jne 0x4025c2
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0xc], eax
lea eax, [ebp + 8]
push eax
push 0x40e460
call fcn.0040285e
pop ecx
pop ecx
test eax, eax
je 0x4025ba
lea eax, [ebp + 8]
push eax
push edi
call fcn.0040285e
pop ecx
pop ecx
test eax, eax
je 0x402696
mov dword [ebp - 0xc], ebx
jmp 0x402696
cmp dword [ebp - 0xc], ebx
je 0x402696
mov edi, eax
lea eax, [ebp + 8]
push eax
push 0x40e458
mov dword [ebp - 0x10], edi
call fcn.0040285e
pop ecx
pop ecx
test eax, eax
je 0x402696
cmp dword [ebp + 8], ebx
je 0x402696
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
mov ecx, esi
call fcn.00402320
test al, al
jne 0x40263b
push 0xc
call fcn.00403af0
pop ecx
cmp eax, ebx
je 0x40261f
mov ecx, dword [ebp + 8]
mov dword [eax], edi
mov dword [eax + 4], ecx
mov dword [eax + 8], ebx
mov dword [ebp - 4], eax
jmp 0x402622
mov dword [ebp - 4], ebx
cmp dword [ebp - 4], ebx
je 0x4026ba
lea eax, [ebp - 4]
push eax
push dword [ebp - 0xc]
mov ecx, esi
call fcn.004023dc
jmp 0x402696
mov edi, dword [ebp - 4]
jmp 0x40265c
push dword [edi]
push dword [ebp - 0x10]
call fcn.00402a90
pop ecx
pop ecx
test eax, eax
je 0x402662
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x40266a
mov edi, eax
mov dword [ebp - 4], edi
cmp edi, ebx
jne 0x402640
jmp 0x402696
mov eax, dword [ebp + 8]
mov dword [edi + 4], eax
jmp 0x402696
push 0xc
call fcn.00403af0
pop ecx
cmp eax, ebx
je 0x402686
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
mov dword [eax], edx
mov dword [eax + 4], ecx
mov dword [eax + 8], ebx
jmp 0x402688
xor eax, eax
push eax
lea ecx, [edi + 8]
call fcn.004022bd
cmp dword [edi + 8], ebx
je 0x4026ba
lea eax, [ebp - 8]
push eax
push 0x40e454
call fcn.0040285e
pop ecx
mov dword [ebp + 8], eax
pop ecx
cmp eax, ebx
jne 0x402557
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 4
mov eax, 0x8007000e
jmp 0x4026b3