Function at 0x40d260
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x603361
mov eax, dword fs:[0]
push eax
sub esp, 0x274
mov eax, dword [0x72d630]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x72d630]
xor eax, esp
push eax
lea eax, [esp + 0x288]
mov dword fs:[0], eax
mov eax, dword [esp + 0x29c]
push 0x104
lea ecx, [esp + 0x80]
xor ebx, ebx
push ecx
push ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea edx, [esp + 0x7c]
push 0x5c
push edx
call dword [sym.imp.MSVCR90.dll_wcsrchr]
add esp, 8
cmp eax, ebx
je 0x40d2d9
xor ecx, ecx
mov word [eax], cx
push 0x6bf618
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0047b760
add esp, 0xc
mov dword [esp + 0x290], ebx
push ebx
push 0x80
push 3
push ebx
push 3
push closesocket
lea eax, [esp + 0x3c]
call fcn.004221b0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
or edi, 0xffffffff
mov eax, str.03_07
lea esi, [esp + 0x1c]
call fcn.004740b0
mov byte [esp + 0x290], 1
cmp ebp, edi
je 0x40d3a5
push 0
lea ecx, [esp + 0x24]
push ecx
push 2
lea edx, [esp + 0x20]
push edx
push ebp
mov byte [esp + 0x2a], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40d39e
cmp dword [esp + 0x20], 2
jne 0x40d39e
mov ecx, 0x6bf630
lea eax, [esp + 0x14]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40d387
test dl, dl
je 0x40d383
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40d387
add eax, 2
add ecx, 2
test dl, dl
jne 0x40d367
xor eax, eax
jmp 0x40d38c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40d39e
push str.07_03
lea eax, [esp + 0x20]
call fcn.00474160
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x90
call sub.mfc90u.dll_new_1
mov ebp, eax
add esp, 4
mov dword [esp + 0x40], ebp
mov byte [esp + 0x290], 2
test ebp, ebp
je 0x40d456
lea eax, [esp + 0x14]
push eax
call fcn.0047bab0
add esp, 4
mov esi, eax
mov byte [esp + 0x290], 3
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x1c], 1
call fcn.00475390
mov edi, eax
mov dword [esp + 0x290], 4
mov edx, dword [esp + 0x3c]
mov ebx, 3
push edx
mov eax, esi
mov dword [esp + 0x1c], ebx
call fcn.004221b0
cmp dword [esp + 0x29c], 0
push eax
sete al
movzx ecx, al
push ecx
push 0
push 1
push 1
push 0x7d8
xor eax, eax
xor ecx, ecx
lea esi, [esp + 0x60]
call fcn.00477490
push eax
lea eax, [esp + 0x2c]
call fcn.004221b0
push eax
mov eax, edi
call fcn.004221b0
push eax
push ebp
call fcn.004a9330
jmp 0x40d458
xor eax, eax
mov dword [esp + 0x290], 6
mov dword [0x741ab0], eax
mov dword [esp + 0x290], 5
test bl, 2
je 0x40d488
and ebx, 0xfffffffd
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], ebx
call fcn.004740c0
mov dword [esp + 0x290], 1
test bl, 1
je 0x40d4a8
and ebx, 0xfffffffe
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], ebx
call fcn.004740c0
push 0x4bc
call sub.mfc90u.dll_new_1
add esp, 4
mov dword [esp + 0x40], eax
mov byte [esp + 0x290], 7
test eax, eax
je 0x40d4cf
push eax
call fcn.004ae8e0
mov esi, eax
jmp 0x40d4d1
xor esi, esi
mov byte [esp + 0x290], 1
push esi
call fcn.004a95e0
mov edi, 0xe
lea eax, [esp + 0x28]
mov ecx, esi
mov dword [esp + 0x28], str.nS__jE
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], 0x6bf670
mov dword [esp + 0x34], edi
call fcn.004aea00
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x6bf680
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], 0x6bf690
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x38], str.caadae4fe38ba62c10d9f072fe47150fH
call fcn.004ae9e0
call fcn.004a9b40
lea ecx, [esp + 0x4c]
call fcn.004754c0
mov byte [esp + 0x290], 8
mov eax, dword [0x741ab0]
lea edx, [esp + 0x4c]
push edx
push eax
call fcn.004a9610
lea ecx, [esp + 0x4c]
call fcn.00475830
test eax, eax
je 0x40d576
push 0
push 0x30
call fcn.004759f0
push eax
call sub.mfc90u.dll_AfxMessageBox_1
mov byte [esp + 0x290], 1
lea ecx, [esp + 0x4c]
call fcn.00475600
mov byte [esp + 0x290], 0
lea ecx, [esp + 0x1c]
call fcn.004740c0
mov dword [esp + 0x290], 0xffffffff
lea ecx, [esp + 0x24]
call fcn.004740c0
mov ecx, dword [esp + 0x288]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.005e038a
add esp, 0x280
ret