Function at 0x402460
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x440050
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x4558d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 4], 0
lea edi, [esi + 4]
mov eax, dword [ebp + 0x10]
push eax
mov ecx, edi
call fcn.00402010
push 0x44384c
mov ebx, dword [ebp + 8]
push ebx
call fcn.0042c65f
add esp, 8
test eax, eax
je 0x4024c5
mov edi, dword [edi]
mov ecx, dword [edi]
push 0x443818
push 0x16
push edi
jmp 0x4024eb
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x4024f0
mov eax, edx
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4024d1
sub eax, edi
sar eax, 1
je 0x4024f0
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push edx
push 0x16
push eax
mov edx, dword [ecx + 0x10]
call edx
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x402526
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40250d
test ebx, ebx
jne 0x40255a
push eax
lea eax, [ebp + 0x10]
push eax
push 1
push 0x443814
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [ebp + 0x10]
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 0x24], eax
test eax, eax
je 0x40250d
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x40250d
mov dword [ebp - 0x14], 0
push 0
lea ecx, [ebp - 0x14]
push ecx
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40250d
mov edx, dword [esi + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [esi + 8]
mov ecx, edi
call fcn.004015e0
push edi
push 1
mov eax, dword [esi + 0x24]
push eax
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jl 0x40264a
mov edi, dword [edi]
test edi, edi
jne 0x4025e2
mov eax, 0x80004005
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
xor ecx, ecx
mov edx, dword [edi]
lea ebx, [ebp - 0x1c]
push ebx
push 2
push ecx
push eax
push edi
mov eax, dword [edx + 0x14]
call eax
test eax, eax
jl 0x4025c9
mov ecx, dword [ebp - 0x1c]
mov dword [esi + 0x10], ecx
mov dword [esi + 0xc], 0
mov eax, dword [esi + 4]
mov edx, dword [eax]
mov ecx, dword [ebp + 8]
push ecx
push 0xe
push eax
mov edx, dword [edx + 0x10]
call edx
mov eax, dword [esi + 4]
mov ecx, dword [eax]
mov edx, dword [esi + 0x10]
push edx
push 0
push 1
push eax
mov eax, dword [ecx + 0x14]
call eax
mov dword [esi + 0x28], 1
push 0x443810
mov ecx, 0x456c90
call fcn.00401820
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc