Function at 0x40b5a0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x424
mov esi, dword [esp + 0x440]
mov edi, dword [esp + 0x43c]
mov eax, dword [0x464010]
xor eax, esp
mov dword [esp + 0x420], eax
mov dword [esp + 0x14], 0
call fcn.0040ec90
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 4], eax
push eax
call fcn.004218d0
add esp, 8
mov ebx, eax
mov dword [esp + 4], 0
mov ebp, 0
cmp eax, 0xffffffff
je 0x40b64f
mov edi, dword [esp + 0x438]
push edi
call fcn.0040eab0
add esp, 4
xor esi, esi
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [edi + 8]
sub eax, esi
jbe 0x40b65d
mov ecx, dword [edi]
add ecx, esi
push 0
lea edx, [esp + 0x24]
push edx
push eax
push ecx
push ebx
call ebp
add esi, dword [esp + 0x20]
test eax, eax
jne 0x40b620
xor ebp, ebp
mov esi, dword [esp + 0x440]
mov edi, dword [esp + 0x43c]
mov dword [edi], 0
mov dword [esi], 0
jmp 0x40b6c0
mov edi, dword [esp + 0x444]
test edi, edi
je 0x40b7cc
push 0
push 0x14
push 1
call fcn.0040e430
add esp, 0xc
mov esi, eax
push 0
push eax
push 0x40b9b0
push ebx
call fcn.00421a70
add esp, 0x10
mov dword [esi], eax
mov dword [esi + 4], ebx
call fcn.0040e970
mov dword [esi + 8], eax
mov dword [esi + 0xc], edi
mov dword [esp + 4], esi
mov eax, dword [esp + 0x448]
mov dword [esi + 0x10], eax
mov ebx, 0xffffffff
xor ebp, ebp
mov esi, dword [esp + 0x440]
mov edi, dword [esp + 0x43c]
push dword [esp + 0x14]
call fcn.0040e4c0
add esp, 4
push dword [esp]
call fcn.0040e4c0
add esp, 4
cmp ebx, 0xffffffff
je 0x40b6e3
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x40b6f0
push ebp
call fcn.0040e9d0
add esp, 4
mov ebx, dword [esp + 4]
test ebx, ebx
jne 0x40b989
cmp dword [edi], 0
jne 0x40b989
mov dword [edi], 0
mov dword [esi], 0
mov eax, dword [esp + 0x438]
cmp dword [eax + 8], 0x40000
ja 0x40b989
push 0x457ee8
push 0x457ee8
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x40b989
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str.PageantRequest_08x
call fcn.0040dd70
add esp, 8
mov edi, eax
xor esi, esi
call fcn.0040f690
mov ecx, 0
test al, al
je 0x40b87c
call fcn.0040f7f0
test eax, eax
je 0x40b878
mov ebx, eax
push 0x14
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
je 0x40b878
mov esi, eax
push 1
push eax
call dword [0x465344]
test eax, eax
je 0x40b871
push 0
push ebx
push esi
call dword [0x465348]
test eax, eax
je 0x40b871
mov dword [esp + 0x14], 0xc
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], esi
lea ecx, [esp + 0x14]
jmp 0x40b87c
call fcn.0040e970
mov ebp, eax
add eax, 0xc
mov dword [esp + 8], eax
lea edi, [esp + 0x20]
jmp 0x40b7e6
mov esi, edx
test esi, esi
jne 0x40b83c
push 0
lea eax, [esp + 0x14]
push eax
push 0x400
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40b641
push dword [esp + 0x10]
push edi
push dword [esp + 0x10]
call fcn.0040de00
add esp, 0xc
mov eax, dword [ebp + 8]
xor esi, esi
cmp eax, 4
jb 0x40b7e2
mov ecx, dword [ebp + 4]
mov ecx, dword [ecx]
bswap ecx
mov edx, 0xffffffff
cmp ecx, 0x40000
ja 0x40b7e0
add ecx, 4
mov edx, ecx
cmp eax, ecx
jae 0x40b7e0
jmp 0x40b7e2
cmp esi, 0xffffffff
je 0x40b641
push ebp
call fcn.0040ea00
add esp, 4
mov edi, dword [esp + 0x43c]
mov dword [edi], eax
mov eax, dword [esp + 0x440]
mov dword [eax], esi
mov esi, eax
xor ebp, ebp
mov dword [esp + 4], 0
jmp 0x40b6c0
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
xor ecx, ecx
push edi
push 0x40000
push 0
push 4
push ecx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
add eax, 1
cmp eax, 1
ja 0x40b8ab
push edi
call fcn.0040e4c0
add esp, 4
mov ebx, dword [esp + 4]
jmp 0x40b989
mov dword [esp + 8], esi
push 0
push 0
push 0
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0xc], edi
mov edi, eax
mov esi, dword [esp + 0x438]
push esi
call fcn.0040eab0
add esp, 4
push dword [esi + 8]
push dword [esi]
mov dword [esp + 8], edi
push edi
mov edi, dword [esp + 0x18]
call fcn.00434730
add esp, 0xc
mov dword [esp + 0x20], 0x804e50ba
push edi
call fcn.0043df00
add esp, 4
add eax, 1
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edi
lea eax, [esp + 0x20]
push eax
push 0
push 0x4a
push ebp
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
jle 0x40b95d
mov eax, dword [esp]
mov esi, dword [eax]
bswap esi
lea eax, [esi - 1]
cmp eax, 0x3fffb
ja 0x40b95d
add esi, 4
push 0
push 1
push esi
call fcn.0040e430
add esp, 0xc
mov ebp, eax
push esi
push dword [esp + 4]
push eax
call fcn.00434730
add esp, 0xc
mov eax, dword [esp + 0x43c]
mov dword [eax], ebp
mov eax, dword [esp + 0x440]
mov dword [eax], esi
push dword [esp]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.0040e4c0
add esp, 4
mov eax, dword [esp + 8]
test eax, eax
mov ebx, dword [esp + 4]
je 0x40b989
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x420]
xor ecx, esp
call fcn.0043208f
mov eax, ebx
add esp, 0x424
pop esi
pop edi
pop ebx
pop ebp
ret