Function at 0x546650
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x30
push edi
mov edi, dword [esp + 0x3c]
mov eax, edi
and al, 3
cmp al, 1
jne 0x546672
call fcn.0040c58d
mov dword [eax], 0x16
xor eax, eax
pop edi
add esp, 0x30
ret
push ebp
push esi
push 0x30
lea ecx, [esp + 0x10]
push 0
push ecx
call fcn.00412eb0
push 0x1e8
mov ebp, 1
push ebp
call fcn.00414d26
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x5466af
call fcn.0040c58d
pop esi
pop ebp
mov dword [eax], 0xc
xor eax, eax
pop edi
add esp, 0x30
ret
push ebx
mov ebx, dword [esp + 0x44]
mov dword [esi + 0x114], 0xffffffff
test ebx, ebx
je 0x5466d1
push ebx
call fcn.00419a1e
add esp, 4
mov dword [esi + 0x118], eax
mov dword [esi + 0x110], edi
mov dword [esp + 0x48], 0
test ebx, ebx
je 0x54671a
test edi, 0x200
jne 0x54671a
lea edx, [esp + 0x10]
push edx
push ebx
call fcn.00554940
add esp, 8
test eax, eax
je 0x546707
call fcn.0040c58d
cmp dword [eax], 2
je 0x54671a
mov eax, dword [esp + 0x30]
or eax, dword [esp + 0x34]
je 0x546733
cmp dword [esp + 0x24], 0
jne 0x546733
jmp 0x54672f
call fcn.0040c58d
cmp dword [eax], 2
jne 0x54672f
call fcn.0040c58d
mov dword [eax], 0
mov dword [esp + 0x48], ebp
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x1e0], ecx
test ebx, ebx
je 0x546761
mov edx, dword [esp + 0x4c]
push edx
or edi, 0x8000
push edi
push ebx
call fcn.00416f2e
add esp, 0xc
mov dword [esi + 0x114], eax
cmp eax, 0xffffffff
je 0x54677b
cmp dword [esp + 0x48], 0
mov ebp, dword [esp + 0x50]
je 0x546787
mov edi, ebp
call fcn.00546170
test eax, eax
jne 0x546857
call fcn.0040c58d
mov edi, dword [eax]
jmp 0x5468b4
test ebp, ebp
je 0x546792
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x546797
mov eax, dword [0x59d0a8]
mov ecx, dword [esi + 0x114]
push 0x104
push esi
push ecx
mov dword [esi + 0x10c], eax
call fcn.00416712
add esp, 0xc
cmp eax, 0xffffffff
je 0x54677b
cmp eax, 0x104
je 0x5467c8
mov edi, 0x16
jmp 0x5468b4
mov eax, esi
call fcn.005458a0
cmp dword [esi], 0x61561
jne 0x5467be
mov eax, dword [esi + 4]
cmp eax, 2
je 0x5467e4
cmp eax, 1
jne 0x5467be
mov edx, dword [esi + 0x10c]
push 0xc
push str.__sniglet
call edx
add esp, 8
cmp eax, dword [esi + 0x40]
jne 0x5467be
cmp dword [esi + 0x38], 0
jl 0x5467be
mov ecx, dword [esi + 0x18]
mov eax, dword [esi + 0x28]
add eax, ecx
cdq
idiv ecx
mov dword [esi + 0x104], 0
mov edi, eax
call fcn.005455f0
test eax, eax
jne 0x54677b
mov eax, dword [esi + 0x20]
mov edx, dword [esi + eax*4 + 0x44]
mov ecx, dword [esi + 0xc]
lea eax, [edx + ecx*8 - 1]
mov ecx, dword [esi + 0x10]
add ecx, 3
sar eax, cl
lea ecx, [esi + 0x13c]
mov dword [esi + 0x1bc], eax
add eax, eax
add eax, eax
push eax
push 0
push ecx
call fcn.00412eb0
add esp, 0xc
test ebp, ebp
je 0x546865
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x546865
push eax
jmp 0x54686a
push 0x10000
push esi
call fcn.005478a0
mov edx, dword [esp + 0x50]
add esp, 8
mov dword [esi + 0x134], edx
test ebx, ebx
je 0x546891
test byte [esi + 0x110], 2
je 0x546891
mov eax, 1
jmp 0x546893
xor eax, eax
push 0x24
mov dword [esi + 0x138], eax
mov dword [esi + 0x128], 0xffffffff
call fcn.00409d81
add esp, 4
test eax, eax
jne 0x5468cc
lea edi, [eax + 0xc]
mov eax, esi
call fcn.00546290
call fcn.0040c58d
pop ebx
pop esi
mov dword [eax], edi
pop ebp
xor eax, eax
pop edi
add esp, 0x30
ret
pop ebx
mov dword [eax + 0x1c], esi
pop esi
pop ebp
mov dword [eax + 4], 0x546480
mov dword [eax + 8], 0x5465c0
mov dword [eax + 0x20], 0x545310
mov dword [eax + 0xc], 0x5464b0
mov dword [eax + 0x10], 0x546520
mov dword [eax + 0x14], 0x545380
mov dword [eax + 0x18], 0x5463f0
mov dword [eax], 1
pop edi
add esp, 0x30
ret