Function at 0x40d690
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1004]
mov eax, 0x1004
call fcn.00454110
push 0xffffffffffffffff
push 0x468db8
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x48b270]
xor eax, ebp
mov dword [ebp + 0x1000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x1014]
mov edi, dword [ebp + 0x100c]
mov esi, ecx
cmp dword [esi + 0x120], 0
mov ecx, dword [ebp + 0x1010]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
je 0x40d797
mov edx, dword [ebp + 0x1018]
push edx
push eax
push ecx
push edi
mov ecx, esi
call fcn.0040be70
mov ebx, eax
test ebx, ebx
jne 0x40d87d
call fcn.00432e51
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d72c
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x14]
push str.CW3MFCClient::TransmitFile__Failed_to_send_response_via_TransmitFile__Error:_d
push ecx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
call edx
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d87d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40d87d
mov edx, dword [ebp + 0x101c]
push edx
push edi
call fcn.00415e40
mov ebx, eax
mov dword [ebp - 0x20], ebx
test ebx, ebx
jne 0x40d82b
call fcn.00432e51
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d7c7
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x14]
push str.CW3MFCClient::TransmitFile__Failed_to_send_to_response_header__Error:_d
push ecx
call fcn.00401f50
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx]
mov edx, dword [edx + 0x18]
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
call edx
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d87d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40d87d
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], 2
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x18]
push 0
lea ecx, [ebp - 0x14]
push ecx
push 0x1000
lea edx, [ebp]
push edx
push eax
call esi
test eax, eax
je 0x40d872
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40d878
mov ecx, dword [ebp + 0x101c]
push ecx
push eax
lea edx, [ebp]
push edx
mov ecx, edi
call fcn.00415ef0
cmp dword [ebp - 0x14], 0
jne 0x40d83f
mov ebx, 1
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1000]
xor ecx, ebp
call fcn.004517f0
add ebp, 0x1004
mov esp, ebp
pop ebp
ret 0x14