Function at 0x45ac30
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5c15fb
mov eax, dword fs:[0]
push eax
sub esp, 0x344
mov eax, dword [0x664e94]
xor eax, esp
mov dword [esp + 0x340], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x664e94]
xor eax, esp
push eax
lea eax, [esp + 0x358]
mov dword fs:[0], eax
mov eax, dword [esp + 0x36c]
mov edx, dword [esp + 0x370]
mov edi, ecx
cmp dword [edi + 4], 0xffffffff
mov ecx, dword [esp + 0x368]
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], edx
jne 0x45ac9f
push 6
jmp 0x45b066
xor ebx, ebx
cmp ecx, ebx
je 0x45b064
cmp eax, ebx
je 0x45b064
mov ecx, dword [eax]
mov dword [eax], ebx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x2c], ebx
call fcn.00496dcd
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x45ace6
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebp, [eax + 0x10]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x360], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
push 0x102
lea ecx, [esp + 0x4c]
push ebx
push ecx
call fcn.0058fa90
mov ecx, dword [edi + 4]
add esp, 0xc
push ebx
lea edx, [esp + 0x2c]
push edx
push 0x100
lea eax, [esp + 0x54]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45afdd
mov esi, dword [esp + 0x28]
cmp dword [edi + 0x10], ebx
je 0x45ad56
mov edx, dword [edi + 0x18]
push edx
push 2
push esi
lea eax, [esp + 0x54]
push eax
mov ecx, edi
call fcn.0045a8a0
cmp esi, ebx
je 0x45afeb
mov eax, dword [esp + 0x44]
cmp eax, 2
jne 0x45ae1b
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esp + 0x48]
push ecx
call ebx
add eax, eax
je 0x45afc8
add dword [esp + 0x20], eax
lea edx, [esp + 0x48]
push 0xa
push edx
call fcn.005909b2
mov esi, eax
add esp, 8
test esi, esi
je 0x45ada6
xor eax, eax
mov word [esi], ax
mov dword [esp + 0x1c], 1
lea ecx, [esp + 0x48]
push ecx
call ebx
add eax, eax
mov ebp, eax
sub ebp, dword [esp + 0x28]
xor edi, edi
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x1c], edi
je 0x45adc6
mov edi, 1
lea edx, [esp + 0x48]
push edx
call ebx
mov ecx, eax
mov eax, dword [esp + 0x24]
add ecx, edi
add ecx, ecx
add dword [eax + 0x18], ecx
test esi, esi
je 0x45ade5
add ebp, 2
mov dword [esp + 0x14], ebp
lea edx, [esp + 0x48]
push 0xd
push edx
call fcn.005909b2
add esp, 8
test eax, eax
je 0x45adfd
xor ecx, ecx
mov word [eax], cx
lea edx, [esp + 0x48]
push edx
lea ecx, [esp + 0x1c]
call fcn.0040232b
lea eax, [esp + 0x48]
push eax
call ebx
add dword [esp + 0x2c], eax
jmp 0x45af42
cmp eax, 1
jne 0x45afdd
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x48]
push ecx
call ebx
test eax, eax
je 0x45afc8
add dword [esp + 0x20], eax
lea edx, [esp + 0x48]
push 0xa
push edx
call fcn.00595fc6
mov esi, eax
add esp, 8
test esi, esi
je 0x45ae5f
xor eax, eax
mov word [esi], ax
mov dword [esp + 0x1c], 1
lea ecx, [esp + 0x48]
push ecx
call ebx
mov ebp, eax
sub ebp, dword [esp + 0x28]
xor edi, edi
mov dword [esp + 0x14], ebp
cmp dword [esp + 0x1c], edi
je 0x45ae7d
mov edi, 1
lea edx, [esp + 0x48]
push edx
call ebx
mov ecx, eax
mov eax, dword [esp + 0x24]
add ecx, edi
add dword [eax + 0x18], ecx
test esi, esi
je 0x45ae98
inc ebp
mov dword [esp + 0x14], ebp
lea edx, [esp + 0x48]
push 0xd
push edx
call fcn.00595fc6
add esp, 8
test eax, eax
je 0x45aeb0
xor ecx, ecx
mov word [eax], cx
lea edx, [esp + 0x48]
push edx
call fcn.00595ee8
lea edi, [eax + 1]
mov dword [esp + 0x3c], eax
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004959d1
add esp, 8
xor esi, esi
mov ebp, eax
test edi, edi
jbe 0x45af1e
mov ebx, ebp
call fcn.00595d8b
push eax
lea eax, [esp + esi + 0x4c]
push eax
push ebx
call fcn.005959cf
add esp, 0xc
test eax, eax
je 0x45af1e
cmp eax, 0xffffffff
je 0x45af0e
add esi, eax
add ebx, 2
cmp esi, edi
jb 0x45aee6
jmp 0x45af1e
sub esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
lea edx, [ecx + esi - 1]
mov dword [esp + 0x14], edx
push ebp
lea ecx, [esp + 0x1c]
call fcn.0040232b
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add dword [esp + 0x2c], eax
push ebp
call fcn.004959c6
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 4
cmp dword [esp + 0x1c], 0
je 0x45afc0
mov esi, dword [esp + 0x3c]
test esi, esi
je 0x45afc0
mov ebp, dword [esp + 0x18]
cmp dword [ebp - 0xc], 0
jl 0x45afc4
push 0x5f3f50
push ebp
call fcn.0058fddd
add esp, 8
test eax, eax
je 0x45afc4
sub eax, ebp
sar eax, 1
jne 0x45afc4
push ebp
lea eax, [esp + 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x5f3f50
call ebx
lea edx, [esp + eax*2 + 0x14c]
movzx eax, word [edx]
xor ecx, ecx
cmp ax, 0x30
jb 0x45afbc
jmp 0x45afa0
cmp ax, 0x39
ja 0x45afbc
movzx eax, ax
lea ecx, [ecx + ecx*4]
add edx, 2
lea ecx, [eax + ecx*2 - 0x30]
movzx eax, word [edx]
cmp ax, 0x30
jae 0x45afa0
mov dword [esi], ecx
jmp 0x45afc4
mov ebp, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
cmp dword [esp + 0x28], 0
je 0x45afeb
cmp dword [esp + 0x1c], 0
jne 0x45afeb
xor ebx, ebx
jmp 0x45ad05
lea ecx, [esp + 0x18]
call fcn.00401443
jmp 0x45b06c
cmp dword [esp + 0x20], 0
mov esi, dword [esp + 0x14]
mov ebx, 1
jbe 0x45b03a
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov dword [ecx], eax
cmp eax, dword [esp + 0x40]
jbe 0x45b01d
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [esp + 0x20]
neg esi
xor ebx, ebx
jmp 0x45b044
test eax, eax
je 0x45b02f
mov edx, dword [esp + 0x30]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x45b044
mov ecx, dword [esp + 0x30]
xor eax, eax
mov word [ecx], ax
jmp 0x45b044
mov edx, dword [esp + 0x34]
mov dword [edx], 0xffffffff
test esi, esi
je 0x45b057
mov eax, dword [edi + 4]
push 1
push 0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x18]
call fcn.00401443
mov eax, ebx
jmp 0x45b06e
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [esp + 0x358]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x340]
xor ecx, esp
call fcn.0058f976
add esp, 0x350
ret 0xc