Function at 0x47d970
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x577830]
xor eax, ebp
mov dword [ebp - 4], eax
movsx eax, word [ecx + 0x20]
push ebx
mov ebx, dword [ebp + 8]
cmp ebx, eax
push esi
push edi
mov dword [ebp - 0x30], ecx
jge 0x47dd34
cmp ebx, 0xffffffff
jl 0x47dd34
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x47d9ab
mov dword [eax], 0
cmp ebx, 0xffffffff
sete al
test al, al
mov byte [ebp - 5], al
je 0x47d9bd
lea ebx, [ecx + 0x28]
jmp 0x47d9c6
imul ebx, ebx, 0x68
add ebx, dword [ecx + 0x90]
cmp dword [ecx + 0x4b0], 0
mov eax, dword [ebx + 0x64]
lea edx, [ecx + 0x49c]
mov dword [ebp - 0x10], edx
je 0x47d9e9
mov ecx, dword [edx + 0x1c]
cmp ecx, eax
ja 0x47d9e4
mov eax, ecx
mov dword [edx + 0x18], eax
jmp 0x47d9f8
mov ecx, dword [edx + 4]
push 0
push eax
push ecx
call fcn.005303b8
add esp, 0xc
mov esi, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
cmp esi, edx
je 0x47dcea
mov ecx, dword [ebx + 8]
mov eax, dword [ebx]
cmp ecx, eax
je 0x47dcea
mov edi, 4
cmp word [ebx + 0x10], di
ja 0x47dcea
sub edx, esi
mov esi, dword [ebp + 0xc]
sub ecx, eax
push esi
call fcn.00459120
test eax, eax
jne 0x47dd36
cmp word [ebx + 0x10], di
jae 0x47da67
or ecx, 0xffffffff
sub esp, 0x10
mov eax, esp
or edx, ecx
mov dword [eax], ecx
mov dword [eax + 4], edx
mov edx, dword [ebp + 0xc]
or esi, ecx
push 0xff000000
or edi, ecx
mov dword [eax + 8], esi
push edx
mov dword [eax + 0xc], edi
call fcn.004588a0
mov esi, dword [ebp + 0xc]
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], eax
mov eax, dword [ebx + 0xc]
sub eax, dword [ebx + 4]
cmp byte [ebp - 5], 0
mov dword [ebp - 0x38], eax
je 0x47da8d
movzx ecx, word [ebx + 0x10]
imul ecx, eax
mov dword [ebp - 0x28], ecx
jmp 0x47da92
mov dword [ebp - 0x28], eax
mov ecx, eax
lea eax, [ecx + ecx]
mov dword [ebp - 0x2c], 0
call fcn.0051d230
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x20], esp
mov dword [ebp - 0x18], edx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor edi, edi
cmp dword [0x58ad04], edi
mov dword [ebp - 0x14], eax
je 0x47dacc
push eax
mov eax, dword [ebp - 0x18]
push eax
call fcn.00470bb0
mov ecx, dword [ebp - 0x18]
jmp 0x47dad4
xor ecx, ecx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ecx
cmp word [ebx + 0x10], 0
mov dword [ebp - 0x24], edi
jbe 0x47dd0c
xor edx, edx
cmp ecx, edx
je 0x47daf0
cmp dword [ecx], edx
jne 0x47dcd3
mov eax, dword [ebx + 0x14]
movsx eax, word [eax + edi*2]
cmp eax, 3
mov dword [ebp - 0xc], edx
ja case.default.0x47daff
jmp dword [eax*4 + 0x47dd4c]
mov dword [ebp - 0xc], 3
jmp case.default.0x47daff
mov dword [ebp - 0xc], 2
jmp case.default.0x47daff
mov dword [ebp - 0xc], 1
jmp case.default.0x47daff
mov dword [ebp - 0xc], edx
cmp byte [ebp - 5], 0
je 0x47db2e
cmp edi, edx
jne 0x47db88
mov edx, dword [ebp - 0x10]
cmp dword [edx + 0x14], 0
lea esi, [ebx + 0x54]
je 0x47db51
push esi
mov eax, 2
mov edi, edx
call fcn.00469830
mov edi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x10]
shr eax, 1
jmp 0x47db6d
mov eax, dword [edx + 4]
test eax, eax
je 0x47db6b
push eax
push 1
push 2
push esi
call fcn.0052edba
mov edx, dword [ebp - 0x10]
add esp, 0x10
jmp 0x47db6d
xor eax, eax
cmp eax, 1
jne 0x47dce2
mov cx, word [esi]
rol cx, 8
mov word [esi], cx
mov ecx, dword [ebp - 0x18]
mov esi, dword [ebp + 0xc]
jmp 0x47db8b
mov edx, dword [ebp - 0x10]
movzx eax, word [ebx + 0x54]
cmp ax, 1
jne 0x47dc8b
cmp dword [ebp - 0x20], 0
je 0x47dcf1
cmp byte [ebp - 5], 0
je 0x47dbb1
test edi, edi
jne 0x47dc43
cmp dword [ebp - 0x28], 0
mov dword [ebp - 0x34], 0
jbe 0x47dc43
mov esi, dword [ebp - 0x20]
jmp 0x47dbca
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x47dbd7
cmp dword [ecx], 0
jne 0x47dcd3
cmp dword [edx + 0x14], 0
je 0x47dbf1
push esi
mov eax, 2
mov edi, edx
call fcn.00469830
mov edx, dword [ebp - 0x10]
shr eax, 1
jmp 0x47dc0d
mov eax, dword [edx + 4]
test eax, eax
je 0x47dc0b
push eax
push 1
push 2
push esi
call fcn.0052edba
mov edx, dword [ebp - 0x10]
add esp, 0x10
jmp 0x47dc0d
xor eax, eax
cmp eax, 1
jne 0x47dce2
mov ax, word [esi]
rol ax, 8
mov word [esi], ax
movzx eax, ax
cmp ax, word [ebp - 0x2c]
jbe 0x47dc2f
movzx ecx, ax
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp - 0x34]
add eax, 1
add esi, 2
cmp eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
jb 0x47dbc7
mov esi, dword [ebp + 0xc]
mov edx, dword [esi + 0xc]
imul edx, dword [esi + 8]
mov eax, dword [ebx + 0xc]
sub eax, dword [ebx + 4]
mov ecx, dword [esi + 0x10]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x20]
lea edx, [ecx + edx*4]
push eax
mov eax, dword [ebp - 0x30]
push edx
mov edx, dword [ebp - 0xc]
add ecx, edx
push eax
call fcn.0047d290
mov esi, eax
test esi, esi
jne 0x47dd00
cmp byte [ebp - 5], al
je 0x47dcb5
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x38]
lea eax, [ecx + edx*2]
mov dword [ebp - 0x20], eax
jmp 0x47dcb5
test ax, ax
jne 0x47dce2
mov ecx, dword [ebx + 0xc]
sub ecx, dword [ebx + 4]
mov eax, dword [ebx + 8]
sub eax, dword [ebx]
mov edx, dword [esi + 0x10]
push ecx
mov ecx, dword [ebp - 0xc]
push eax
add edx, ecx
push edx
mov edx, dword [ebp - 0x30]
push edx
call fcn.0047d490
mov esi, eax
test esi, esi
jne 0x47dd00
mov eax, dword [ebp - 0x24]
movzx ecx, word [ebx + 0x10]
mov esi, dword [ebp + 0xc]
add eax, 1
cmp eax, ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x24], eax
jge 0x47dd0c
mov edi, eax
jmp 0x47dae2
lea eax, [ebp - 0x1c]
call fcn.0043a6d0
mov eax, 0xf4242
jmp 0x47dd36
lea eax, [ebp - 0x1c]
call fcn.0043a6d0
mov eax, 3
jmp 0x47dd36
lea eax, [ebp - 0x1c]
call fcn.0043a6d0
mov eax, 4
jmp 0x47dd36
lea eax, [ebp - 0x1c]
call fcn.0043a6d0
mov eax, esi
jmp 0x47dd36
cmp byte [ebp + 0x10], 0
je 0x47dd21
cmp word [ebx + 0x10], 4
jne 0x47dd21
call fcn.0045ad70
mov ecx, dword [ebp - 0x18]
cmp dword [0x58ad04], 0
je 0x47dd34
mov edx, dword [ebp - 0x14]
push edx
push ecx
call fcn.00470f90
xor eax, eax
lea esp, [ebp - 0x48]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005120db
mov esp, ebp
pop ebp
ret 0x10