Function at 0x45dbb0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x348
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocString
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x45df2a
push ebx
lea ecx, [ebp + 8]
push ecx
push 0xc
lea edx, [ebp - 0x28]
push edx
push esi
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45df2a
cmp dword [ebp + 8], 0xc
jne 0x45df2a
mov eax, dword [ebp - 0x24]
movzx edx, byte [ebp - 0x24]
shr eax, 8
shl dx, 8
movzx cx, al
mov eax, dword [ebp - 0x28]
or cx, dx
movzx edx, byte [ebp - 0x28]
shr eax, 8
shl dx, 8
movzx ax, al
or ax, dx
mov word [ebp - 0x24], cx
mov edx, dword [ebp - 0x26]
push edi
movzx di, byte [ebp - 0x26]
shr edx, 8
movzx dx, dl
shl di, 8
or dx, di
mov word [ebp - 0x28], ax
mov word [ebp - 0x26], dx
cmp ax, 1
jne 0x45df29
cmp dx, bx
jne 0x45df29
xor eax, eax
xor edi, edi
cmp ax, cx
jae 0x45df29
push ebx
lea ecx, [ebp + 8]
push ecx
push 0x10
lea edx, [ebp - 0x3c]
push edx
push esi
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45dcaa
cmp dword [ebp + 8], ebx
je 0x45dcaa
push 4
lea eax, [ebp - 0x3c]
push 0x4da7c4
push eax
call fcn.004bbc44
add esp, 0xc
test eax, eax
je 0x45dcb8
movzx ecx, word [ebp - 0x24]
inc edi
cmp edi, ecx
jl 0x45dc75
jmp 0x45df29
mov ecx, dword [ebp - 0x30]
movzx dx, cl
mov eax, ecx
shl dx, 8
movzx edx, dx
shr ecx, 8
movzx ecx, cl
or edx, ecx
shr eax, 0x10
movzx cx, al
shr eax, 8
shl cx, 8
shl edx, 0x10
movzx eax, al
movzx ecx, cx
or edx, ecx
or edx, eax
mov dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x34]
movzx ax, dl
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, edx
shl ax, 8
shr edx, 8
movzx eax, ax
movzx edx, dl
or eax, edx
shr ecx, 0x10
movzx dx, cl
shl dx, 8
movzx edx, dx
shr ecx, 8
shl eax, 0x10
movzx ecx, cl
push ebx
or eax, edx
or eax, ecx
push ebx
push eax
push esi
mov dword [ebp - 0x34], eax
call edi
cmp eax, 0xffffffff
je 0x45df29
push ebx
lea edx, [ebp + 8]
push edx
push 6
lea eax, [ebp - 0xc]
push eax
push esi
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45df29
cmp dword [ebp + 8], ebx
je 0x45df29
mov ecx, dword [ebp - 0xa]
movzx dx, byte [ebp - 0xa]
shr ecx, 8
movzx ax, cl
mov ecx, dword [ebp - 8]
shl dx, 8
or ax, dx
shr ecx, 8
movzx dx, cl
movzx cx, byte [ebp - 8]
shl cx, 8
or dx, cx
mov word [ebp - 8], dx
xor edx, edx
mov word [ebp - 0xa], ax
mov dword [ebp - 0x2c], ebx
cmp dx, ax
jae 0x45df29
push ebx
lea eax, [ebp + 8]
push eax
push 0xc
lea ecx, [ebp - 0x1c]
push ecx
push esi
mov dword [ebp + 8], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45de8d
cmp dword [ebp + 8], ebx
je 0x45de8d
mov edx, dword [ebp - 0x16]
movzx cx, byte [ebp - 0x16]
shr edx, 8
movzx ax, dl
shl cx, 8
or ax, cx
mov word [ebp - 0x16], ax
cmp ax, 1
jne 0x45de8d
mov edx, dword [ebp - 0x14]
movzx ecx, byte [ebp - 0x14]
shr edx, 8
movzx ax, dl
mov edx, dword [ebp - 0x12]
shl cx, 8
or ax, cx
movzx ecx, byte [ebp - 0x12]
push 1
mov word [ebp - 0x14], ax
shr edx, 8
movzx ax, dl
push ebx
shl cx, 8
push ebx
or ax, cx
push esi
mov word [ebp - 0x12], ax
call edi
movzx edx, word [ebp - 0x12]
add edx, dword [ebp - 0x34]
mov ebx, eax
movzx eax, word [ebp - 8]
push 0
push 0
add eax, edx
push eax
push esi
call edi
cmp eax, 0xffffffff
je 0x45de83
movzx eax, word [ebp - 0x14]
lea ecx, [eax + 1]
cmp ecx, 0x21
jge 0x45de83
push 0
lea edx, [ebp + 8]
push edx
mov byte [ebp + eax - 0x13f], 0
push ecx
lea eax, [ebp - 0x140]
push eax
push esi
mov dword [ebp + 8], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45de83
cmp dword [ebp + 8], 0
je 0x45de83
cmp byte [ebp - 0x140], 0
jne 0x45dea5
push 0
push 0
push ebx
push esi
call edi
xor ebx, ebx
mov eax, dword [ebp - 0x2c]
movzx ecx, word [ebp - 0xa]
inc eax
cmp eax, ecx
mov dword [ebp - 0x2c], eax
jl 0x45dda1
jmp 0x45df29
movzx ecx, word [ebp - 0x14]
mov eax, ecx
test eax, eax
jl 0x45dec7
nop
cmp byte [ebp + eax - 0x140], 0x20
jne 0x45dec7
sub eax, 1
mov byte [ebp + eax - 0x13f], 0
jns 0x45deb0
mov byte [ebp + ecx - 0x140], 0
cmp byte [ebp - 0x140], 0
je 0x45df27
push 0x20
lea edx, [ebp - 0x348]
push edx
push 0xffffffffffffffff
lea eax, [ebp - 0x140]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x348]
push edx
xor ecx, ecx
push eax
mov word [ebp - 0x30a], cx
mov dword [ebp - 4], 1
call fcn.0040ee90
mov edx, dword [ebp + 0x10]
lea ecx, [ebp - 0x348]
push ecx
push edx
call fcn.0040ee90
add esp, 0x10
xor ebx, ebx
pop edi
cmp esi, ebx
je 0x45df3a
cmp esi, 0xffffffff
je 0x45df3a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc