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

Disassembly:
push 0x34
mov eax, 0x51888d
call fcn.004db753
mov esi, ecx
mov dword [ebp - 0x24], esi
push dword [ebp + 8]
lea edi, [esi + 0x78]
mov ecx, edi
mov dword [ebp - 0x30], edi
call fcn.0049518b
mov ebx, eax
mov dword [ebp - 0x2c], ebx
cmp byte [ebx + 0x1c], 0
je 0x493643
xor eax, eax
jmp 0x493aa5
push dword [ebp + 8]
mov ecx, edi
call fcn.0049518b
mov ecx, esi
push dword [eax + 4]
call fcn.004949b0
push eax
lea ecx, [ebp - 0x14]
call fcn.0040713a
and dword [ebp - 4], 0
mov ecx, edi
push dword [ebp + 8]
call fcn.0049518b
add eax, 0x18
lea edx, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
call fcn.00473860
pop ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
mov eax, dword [ebx + 0xc]
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
call fcn.0040d91c
push 2
pop eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], al
call fcn.0047b080
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
mov bl, al
call fcn.0040d133
test bl, bl
jne 0x4936d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
push 0x104
call fcn.0049493a
mov dword [ebp - 0x18], 0xe
jmp 0x493a8a
mov esi, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
push 0
push esi
call fcn.0049b2ea
mov ebx, dword [ebp + 0xc]
pop ecx
pop ecx
test al, al
jne 0x49379a
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x49370d
mov eax, dword [ecx]
push 0
push esi
push dword [ebp - 0x14]
call dword [eax]
test eax, eax
jne 0x49379a
cmp byte [0x57f574], 0
je 0x49378e
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x14]
add eax, 0x18
lea ecx, [ebp + 0xc]
push eax
call fcn.00473860
pop ecx
mov esi, eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call fcn.0040ce6d
mov edi, 0x5422d8
mov byte [ebp - 4], 4
mov esi, dword [esi]
push edi
call fcn.004e0c46
pop ecx
push eax
push edi
lea ecx, [ebp + 8]
call fcn.00410f2f
test esi, esi
je 0x493768
push esi
call fcn.004e0c46
pop ecx
push eax
push esi
lea ecx, [ebp + 8]
call fcn.00410f2f
lea eax, [ebp + 8]
mov ecx, 0x57f540
push eax
call fcn.004a1ee4
lea ecx, [ebp + 8]
mov byte [ebp - 4], 5
call fcn.0040d133
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.0040d133
mov dword [ebp - 0x18], 0xa
jmp 0x493a8a
push dword [ebp + 8]
mov ecx, edi
call fcn.0049518b
mov ebx, dword [ebx]
mov dword [ebp + 0xc], ebx
mov eax, dword [eax + 4]
mov dword [ebp - 0x2c], eax
test ebx, ebx
je 0x4937e8
push dword [ebp + 8]
mov esi, dword [ebx]
mov ecx, edi
call fcn.0049518b
push 0
mov ecx, ebx
push dword [eax + 0xc]
call dword [esi + 0x1c]
push dword [ebp + 8]
mov esi, dword [ebx]
mov ecx, edi
call fcn.0049518b
lea ecx, [ebp - 0x10]
push dword [eax]
call fcn.0047a550
push eax
mov ecx, ebx
call dword [esi + 0x14]
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x24]
cmp eax, 0xc
jne 0x4937ff
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebx + 0xa4]
call fcn.004706a0
lea eax, [ebx + 0xb0]
xor dl, dl
push eax
lea ecx, [ebp - 0x10]
call fcn.0047abd0
pop ecx
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x38], 0x533e68
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 6
cmp eax, 0xffffffff
jne 0x493911
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
push 0x104
call fcn.0049493a
cmp byte [0x57f574], 0
je 0x493a6d
push ecx
call esi
mov edx, eax
lea ecx, [ebp + 0xc]
call fcn.004767c0
pop ecx
mov esi, eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 7
call fcn.0040ce6d
mov byte [ebp - 4], 8
mov ebx, str.Failed_to_extract_file:
mov esi, dword [esi]
mov edi, dword [ebp - 0x10]
push ebx
call fcn.004e0c46
pop ecx
push eax
push ebx
lea ecx, [ebp + 8]
call fcn.00410f2f
test edi, edi
je 0x4938bb
push edi
call fcn.004e0c46
pop ecx
push eax
push edi
lea ecx, [ebp + 8]
call fcn.00410f2f
mov edi, str._Error:
push edi
call fcn.004e0c46
pop ecx
push eax
push edi
lea ecx, [ebp + 8]
call fcn.00410f2f
test esi, esi
je 0x4938e6
push esi
call fcn.004e0c46
pop ecx
push eax
push esi
lea ecx, [ebp + 8]
call fcn.00410f2f
lea eax, [ebp + 8]
mov ecx, 0x57f540
push eax
call fcn.004a1ee4
lea ecx, [ebp + 8]
mov byte [ebp - 4], 9
call fcn.0040d133
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 6
call fcn.0040d133
jmp 0x493a6d
push dword [ebp + 8]
mov edi, dword [ebx + 0x58]
lea ecx, [ebx + 0x78]
mov esi, dword [ebx + 0x5c]
call fcn.0049518b
mov ecx, dword [eax + 0x10]
xor eax, eax
add ecx, edi
mov dword [ebp - 0x40], ecx
adc eax, esi
xor esi, esi
push esi
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
push ecx
push dword [ebx + 0x88]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x493966
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebx + 0x60]
mov ecx, ebx
push eax
push 0x103
call fcn.0049493a
jmp 0x493a6d
mov dword [ebp - 0x20], esi
mov eax, 0x10000
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x20]
call fcn.004950d4
push dword [ebp + 8]
lea ecx, [ebx + 0x78]
mov dword [ebx + 0xd0], esi
call fcn.0049518b
push dword [ebp + 8]
lea ecx, [ebx + 0x78]
mov eax, dword [eax + 8]
shr eax, 1
and eax, 0xffffff01
mov dword [ebp - 0x2c], eax
call fcn.0049518b
and dword [ebp - 0x24], 0
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp + 0xc]
mov edi, dword [eax + 0xc]
test ecx, ecx
je 0x4939c2
mov eax, dword [ecx]
call dword [eax + 0x24]
test al, al
jne 0x493aad
mov ecx, 0x10000
mov eax, edi
cmp edi, ecx
push 0
cmova eax, ecx
lea ecx, [ebp - 0x1c]
push ecx
push eax
push esi
push dword [ebx + 0x88]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x493a4b
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x493a4b
cmp byte [ebp - 0x2c], 0
je 0x493a03
push eax
push esi
lea ecx, [ebx + 0xc8]
call fcn.004a6743
mov eax, dword [ebp - 0x1c]
push 0
lea ecx, [ebp - 0x1c]
push ecx
push eax
push esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x493a4b
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x493a4b
mov edx, dword [ebp - 0x24]
sub edi, eax
mov ecx, dword [ebp + 0xc]
add edx, eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x24], edx
test ecx, ecx
je 0x493a43
mov edi, dword [ecx]
mov eax, edx
cdq
push edx
push eax
call dword [edi + 0x20]
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp - 0x18]
test edi, edi
jg 0x4939b1
push dword [ebp + 8]
mov ecx, dword [ebp - 0x30]
call fcn.0049518b
and dword [ebp - 0x18], 0
mov byte [eax + 0x1c], 1
push esi
mov byte [ebp - 4], 6
call fcn.004db29c
and dword [ebp - 0x20], 0
pop ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], 0x533e68
test eax, eax
je 0x493a8a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x34], 0
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0
call fcn.0040d133
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.0040d133
mov eax, dword [ebp - 0x18]
call fcn.004db71c
ret 8
mov dword [ebp - 0x18], 0xf
jmp 0x493a5e