Function at 0x42d270
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50dfe1
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x574be0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
mov eax, dword [0x575ba4]
mov ecx, 0x575ba4
call dword [eax + 0xc]
mov ebx, dword [ebp + 8]
add eax, 0x10
mov dword [ebx], eax
mov dword [ebp - 4], 0
cmp dword [esi], 0xffffffff
mov dword [ebp - 0x10], 1
je 0x42d56f
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 1
mov esi, dword [ebp + 0xc]
push esi
lea ecx, [ebp - 0x20]
call fcn.0042c6d0
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
push 0
push dword [ebp + 0x10]
push esi
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42d562
mov al, byte [edi]
xor cl, cl
mov byte [ebp + 0xf], cl
mov byte [ebp + 0x13], cl
cmp al, 0xff
jne 0x42d33b
cmp byte [edi + 1], 0xfe
jne 0x42d33b
mov byte [ebp + 0xf], 1
mov eax, 2
jmp 0x42d375
cmp al, 0xfe
jne 0x42d354
cmp byte [edi + 1], 0xff
jne 0x42d354
mov byte [ebp + 0xf], 1
mov byte [ebp + 0x13], 1
mov eax, 2
jmp 0x42d375
cmp al, 0xef
jne 0x42d3f5
cmp byte [edi + 1], 0xbb
jne 0x42d3f5
cmp byte [edi + 2], 0xbf
jne 0x42d3f5
mov eax, 3
mov esi, dword [ebp - 0x1c]
add eax, edi
cmp eax, esi
jne 0x42d382
mov esi, edi
jmp 0x42d395
cmp edi, eax
je 0x42d398
sub esi, eax
push esi
push eax
push edi
call fcn.004ea3d0
add esp, 0xc
add esi, edi
mov dword [ebp - 0x1c], esi
cmp byte [ebp + 0x13], 0
je 0x42d3b8
mov ecx, edi
cmp edi, esi
je 0x42d3b8
mov dl, byte [ecx]
mov bl, byte [ecx + 1]
mov byte [ecx + 1], dl
mov byte [ecx], bl
add ecx, 2
cmp ecx, esi
jne 0x42d3a4
mov ebx, dword [ebp + 8]
mov cl, byte [ebp + 0xf]
sub esi, edi
cmp byte [edi + esi - 1], 0
je 0x42d3fa
inc esi
push esi
lea ecx, [ebp - 0x20]
call fcn.0042c6d0
mov edi, dword [ebp - 0x20]
mov al, byte [ebp + 0xf]
mov byte [edi + esi - 1], 0
test al, al
je 0x42d4f9
inc esi
push esi
lea ecx, [ebp - 0x20]
call fcn.0042c6d0
mov edi, dword [ebp - 0x20]
mov byte [edi + esi - 1], 0
jmp 0x42d417
mov esi, dword [ebp - 0x1c]
jmp 0x42d3bb
test cl, cl
je 0x42d4f9
lea eax, [esi + 2]
push eax
lea ecx, [ebp - 0x20]
call fcn.0042c6d0
mov edi, dword [ebp - 0x20]
mov word [edi + esi], 0
mov eax, dword [0x575ba4]
mov ecx, 0x575ba4
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 0xc], esi
mov byte [ebp - 4], 2
test edi, edi
je 0x42d471
test edi, 0xffff0000
jne 0x42d459
movzx eax, di
mov ecx, eax
mov dword [ebp + 0x10], eax
call fcn.0041fcd0
test eax, eax
je 0x42d480
push dword [ebp + 0x10]
lea ecx, [ebp + 0xc]
push eax
call fcn.00420bb0
jmp 0x42d47d
mov ecx, edi
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x42d460
sub ecx, edx
sar ecx, 1
jmp 0x42d473
xor ecx, ecx
push ecx
push edi
lea ecx, [ebp + 0xc]
call fcn.00420c80
mov esi, dword [ebp + 0xc]
mov byte [ebp - 4], 3
mov ebx, dword [ebx]
lea edx, [esi - 0x10]
sub ebx, 0x10
or ecx, 0xffffffff
mov dword [ebp + 0x10], edx
cmp edx, ebx
je 0x42d4f0
cmp dword [ebx + 0xc], 0
jl 0x42d4d6
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x42d4d6
mov ecx, edx
call fcn.00420750
mov esi, eax
or ecx, 0xffffffff
lea edx, [ebx + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42d4c2
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov ebx, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
lea eax, [esi + 0x10]
mov dword [ebx], eax
or ecx, 0xffffffff
mov byte [ebp - 4], 1
jmp 0x42d54e
push dword [esi - 0xc]
mov ebx, dword [ebp + 8]
push esi
mov ecx, ebx
call fcn.00420c80
mov edx, dword [ebp + 0x10]
or ecx, 0xffffffff
mov byte [ebp - 4], 1
jmp 0x42d54e
mov ebx, dword [ebp + 8]
mov byte [ebp - 4], 1
jmp 0x42d54e
mov eax, dword [0x575ba4]
mov ecx, 0x575ba4
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 0xc], eax
mov byte [ebp - 4], 4
test edi, edi
jne 0x42d518
xor ecx, ecx
jmp 0x42d529
mov ecx, edi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x42d520
sub ecx, edx
push ecx
push edi
lea ecx, [ebp + 0xc]
call fcn.0042ca60
mov edx, ebx
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 5
call fcn.0042c120
mov byte [ebp - 4], 1
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x42d562
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x42d56f
push edi
call fcn.004ea2dd
add esp, 4
mov eax, ebx
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