Function at 0x47ebf0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50db89
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x572bb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
call fcn.00460220
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x47ec44
push 0x80004005
call fcn.004712d0
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebp + 8]
add eax, 0x10
mov dword [ecx], eax
mov dword [ebp - 4], 0
cmp dword [edi], 0xffffffff
mov dword [ebp - 0x10], 1
je 0x47ee90
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x1c]
mov esi, dword [ebp + 0xc]
push esi
call fcn.0047e050
push 0
push dword [ebp + 0x10]
push esi
mov esi, dword [ebp - 0x1c]
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47ee83
mov al, byte [esi]
xor bh, bh
xor bl, bl
cmp al, 0xff
jne 0x47ecc3
cmp byte [esi + 1], 0xfe
jne 0x47ecc3
mov bh, 1
mov eax, 2
jmp 0x47eced
cmp al, 0xfe
jne 0x47ecd8
cmp byte [esi + 1], 0xff
jne 0x47ecd8
mov bh, 1
mov eax, 2
mov bl, bh
jmp 0x47eced
cmp al, 0xef
jne 0x47ed33
cmp byte [esi + 1], 0xbb
jne 0x47ed33
cmp byte [esi + 2], 0xbf
jne 0x47ed33
mov eax, 3
mov edi, dword [ebp - 0x18]
add eax, esi
cmp eax, edi
jne 0x47ecfa
mov edi, esi
jmp 0x47ed0d
cmp esi, eax
je 0x47ed10
sub edi, eax
push edi
push eax
push esi
call fcn.004e99a0
add esp, 0xc
add edi, esi
mov dword [ebp - 0x18], edi
test bl, bl
je 0x47ed36
mov ecx, esi
cmp esi, edi
je 0x47ed36
lea ebx, [ebx]
mov dl, byte [ecx]
mov bl, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [ecx], bl
add ecx, 2
cmp ecx, edi
jne 0x47ed20
jmp 0x47ed36
mov edi, dword [ebp - 0x18]
sub edi, esi
cmp byte [esi + edi - 1], 0
je 0x47ed6d
inc edi
lea ecx, [ebp - 0x1c]
push edi
call fcn.0047e050
mov esi, dword [ebp - 0x1c]
mov byte [esi + edi - 1], 0
test bh, bh
je 0x47ee04
inc edi
lea ecx, [ebp - 0x1c]
push edi
call fcn.0047e050
mov esi, dword [ebp - 0x1c]
mov byte [esi + edi - 1], 0
jmp 0x47ed8a
test bh, bh
je 0x47ee04
lea eax, [edi + 2]
push eax
lea ecx, [ebp - 0x1c]
call fcn.0047e050
mov esi, dword [ebp - 0x1c]
mov word [esi + edi], 0
push esi
lea ecx, [ebp + 0x10]
call fcn.00471bb0
mov byte [ebp - 4], 2
or ebx, 0xffffffff
mov edx, dword [eax]
mov eax, dword [ebp + 8]
lea ecx, [edx - 0x10]
mov edi, dword [eax]
sub edi, 0x10
cmp ecx, edi
je 0x47edee
cmp dword [edi + 0xc], 0
jl 0x47ede2
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x47ede2
call fcn.00471fb0
mov dword [ebp + 0xc], eax
lea edx, [edi + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x47edd8
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
add eax, 0x10
mov dword [ecx], eax
jmp 0x47edee
push dword [edx - 0xc]
mov ecx, dword [ebp + 8]
push edx
call fcn.004725a0
mov byte [ebp - 4], 1
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jmp 0x47ee79
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x47ee20
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 0xc], eax
mov byte [ebp - 4], 3
test esi, esi
jne 0x47ee39
xor ecx, ecx
jmp 0x47ee49
mov ecx, esi
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x47ee40
sub ecx, edx
push ecx
push esi
lea ecx, [ebp + 0xc]
call fcn.0047e3b0
mov byte [ebp - 4], 4
lea ecx, [ebp + 0xc]
mov edx, dword [ebp + 8]
call fcn.0047da90
mov byte [ebp - 4], 1
or ecx, 0xffffffff
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x47ee83
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x47ee90
push esi
call fcn.004e98a6
add esp, 4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc