Function at 0x402140
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410403
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x416008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x44], eax
mov esi, ecx
mov ecx, eax
call fcn.00404080
cmp dword [esi + 0x14], 8
jb 0x402184
mov esi, dword [esi]
push 0
push 0x8000000
push 3
push 0
push 1
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x40], ebx
cmp ebx, 0xffffffff
je 0x40258b
push 0x18
lea eax, [ebp - 0x2c]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandleEx]
test eax, eax
je 0x40257e
mov esi, dword [ebp - 0x24]
push esi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x38], edi
test edi, edi
je 0x402584
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40256c
mov eax, dword [ebp - 0x14]
lea ebx, [edi + 3]
add eax, 0xfffffffd
mov dword [ebp - 0x4c], ebx
push eax
push ebx
lea edx, [ebp - 0x34]
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x34], 0
call fcn.00401820
add esp, 8
test al, al
je 0x402569
xor esi, esi
mov dword [ebp - 0x3c], esi
cmp dword [ebp - 0x34], esi
jbe 0x40255d
mov ecx, dword [ebp - 0x30]
mov edi, esi
shl edi, 4
add edi, ecx
mov dword [ebp - 0x48], edi
cmp dword [edi], 3
jne 0x40254d
mov ecx, dword [edi + 4]
mov eax, dword [edi + 8]
sub eax, ecx
lea edx, [ecx + ebx]
cmp eax, 0xf
jne 0x40254a
push eax
push str.ShortCutList_V2
push edx
call dword [sym.imp.msvcrt.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x40254a
cmp dword [edi + 0x10], 1
jne 0x40254a
mov eax, dword [edi + 0x1c]
xor ebx, ebx
test eax, eax
je 0x402544
add edi, 0x34
lea esp, [esp]
cmp dword [edi - 0x14], 3
jne 0x40252f
cmp dword [edi - 4], 3
jne 0x40252f
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov edx, dword [ebp - 0x38]
sub ecx, eax
add edx, 3
mov dword [ebp - 0x7c], 0
push ecx
add eax, edx
mov dword [ebp - 0x6c], 0
push eax
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x68], 0xf
mov byte [ebp - 0x7c], 0
call fcn.004046a0
lea edx, [ebp - 0x7c]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00408c20
mov esi, eax
mov eax, dword [ebp - 0x38]
mov byte [ebp - 4], 1
add eax, 3
mov ecx, dword [edi - 0x10]
mov edx, dword [edi - 0xc]
sub edx, ecx
mov dword [ebp - 0x64], 0
add ecx, eax
mov dword [ebp - 0x54], 0
push edx
push ecx
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x50], 0xf
mov byte [ebp - 0x64], 0
call fcn.004046a0
lea edx, [ebp - 0x64]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xc4]
call fcn.00408c20
mov edx, eax
mov ecx, dword [edx]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x9c], eax
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x98], eax
xor eax, eax
mov dword [ebp - 0xac], ecx
mov ecx, dword [edx + 4]
mov dword [ebp - 0xa8], ecx
mov ecx, dword [edx + 8]
mov dword [ebp - 0xa4], ecx
mov ecx, dword [edx + 0xc]
mov word [edx], ax
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 7
mov eax, dword [esi]
mov dword [ebp - 0x94], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x90], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x8c], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x88], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x84], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x80], eax
xor eax, eax
mov dword [ebp - 0xa0], ecx
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 4
push eax
lea eax, [ebp - 0xcc]
push eax
mov ecx, dword [ebp - 0x44]
call fcn.00404bd0
lea ecx, [ebp - 0xac]
call fcn.004025b0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0xb0]
cmp edx, 8
jb 0x40243b
mov ecx, dword [ebp - 0xc4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402431
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4025a7
push edx
push ecx
call fcn.00409afe
add esp, 8
xor eax, eax
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xb0], 7
mov word [ebp - 0xc4], ax
cmp edx, 0x10
jb 0x402490
mov ecx, dword [ebp - 0x64]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x402486
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4025a7
push edx
push ecx
call fcn.00409afe
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0xf
mov byte [ebp - 0x64], 0
cmp edx, 8
jb 0x4024e0
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4024d6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4025a7
push edx
push ecx
call fcn.00409afe
add esp, 8
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x68]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp edx, 0x10
jb 0x40252f
mov eax, dword [ebp - 0x7c]
inc edx
mov ecx, eax
cmp edx, 0x1000
jb 0x402525
mov eax, dword [eax - 4]
add edx, 0x23
sub ecx, eax
add ecx, 0xfffffffc
cmp ecx, 0x1f
ja 0x4025a7
push edx
push eax
call fcn.00409afe
add esp, 8
mov eax, dword [ebp - 0x48]
inc ebx
add edi, 0x20
mov eax, dword [eax + 0x1c]
cmp ebx, eax
jb 0x4022a0
mov esi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x4c]
inc esi
add esi, eax
mov ecx, dword [ebp - 0x30]
inc esi
mov dword [ebp - 0x3c], esi
cmp esi, dword [ebp - 0x34]
jb 0x402243
mov edi, dword [ebp - 0x38]
push dword [ebp - 0x30]
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
mov ebx, dword [ebp - 0x40]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x402584
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040975a
mov esp, ebp
pop ebp
ret
call fcn.0040a5e0
int3