Function at 0x1000d360
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x230
mov eax, dword [0x10025160]
xor eax, esp
mov dword [esp + 0x22c], eax
mov eax, dword [esp + 0x23c]
push ebx
push ebp
mov ebp, dword [esp + 0x240]
mov dword [esp + 0x10], eax
push esi
mov esi, dword [esp + 0x240]
mov eax, ebp
shr eax, 9
push edi
mov edi, dword [esp + 0x250]
add eax, 1
push 2
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x38], eax
call fcn.1000bd40
add esp, 4
push eax
push 1
call fcn.1000bd30
push 0
push 0
push 0x200
mov ebx, 1
push esi
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1000d3ee
mov eax, 2
jmp 0x1000d7c6
lea eax, [ebp + 0x1ff]
shr eax, 9
cmp eax, 1
mov dword [esp + 0x20], eax
jbe 0x1000d7c2
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x1000d7c6
push eax
lea ecx, [esp + 0x2c]
push ecx
push 0x200
lea edx, [esp + 0x48]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000d7df
cmp dword [esp + 0x28], 0x200
jne 0x1000d7df
mov ax, word [esp + 0x3c]
cmp ax, 0xa5ec
je 0x1000d452
cmp ax, 0xa5dc
jne 0x1000d6fb
mov eax, dword [esp + 0x54]
shr eax, 9
add eax, ebx
cmp eax, dword [esp + 0x20]
jae 0x1000d6fb
or byte [edi + ebx], 2
push 0x204
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x38], ebp
jne 0x1000d49b
mov ebp, dword [esp + 0x248]
mov dword [esp + 0x14], 8
jmp 0x1000d7b8
mov ecx, dword [esp + 0x54]
shr ecx, 9
add ebx, ecx
push 0
push 0
mov edx, ebx
shl edx, 9
push edx
push esi
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1000d4cb
mov dword [esp + 0x14], 2
jmp 0x1000d6bc
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x58]
sub esi, eax
movzx eax, ax
and eax, 0x800001ff
mov dword [esp + 0x30], esi
jns 0x1000d4ea
dec eax
or eax, 0xfffffe00
inc eax
test esi, esi
movzx edi, ax
jbe 0x1000d6bc
mov eax, ebx
imul eax, eax, 0x64
mov dword [esp + 0x2c], eax
mov edi, edi
cmp dword [esp + 0x14], 0
jne 0x1000d6b8
cmp ebx, dword [esp + 0x20]
jae 0x1000d6b8
cmp esi, 0x200
jbe 0x1000d52d
mov ecx, 0x200
sub ecx, edi
movzx edx, cx
mov dword [esp + 0x10], edx
jmp 0x1000d534
movzx eax, si
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x2c]
push ecx
push 0x200
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1000d6b0
cmp dword [esp + 0x28], 0x200
jne 0x1000d6b0
movzx eax, word [ebp]
cmp ax, 0xa5ec
je 0x1000d688
cmp ax, 0xa5dc
je 0x1000d688
push ebp
call fcn.1000ccf0
add esp, 4
test eax, eax
jne 0x1000d688
push ebp
call fcn.1000cef0
add esp, 4
test eax, eax
jne 0x1000d688
mov eax, dword [esp + 0x24]
mov al, byte [eax + ebx]
test al, 1
je 0x1000d5c4
cmp byte [0x100250f1], 0
je 0x1000d626
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
call eax
mov byte [0x100250f1], 0
jmp 0x1000d626
test al, 2
jne 0x1000d626
movzx esi, word [esp + 0x10]
movzx ecx, di
lea edi, [ecx + ebp]
push esi
push edi
call fcn.1000c140
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1000d5f2
push edi
mov eax, esi
call fcn.1000bea0
add esp, 4
test eax, eax
je 0x1000d616
push ebp
push esi
mov esi, dword [esp + 0x20]
push edi
push esi
call fcn.1000bf40
add esp, 0x10
test eax, eax
jne 0x1000d67a
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
mov byte [0x100250f1], 1
mov eax, dword [esp + 0x24]
or byte [eax + ebx], 2
mov ebp, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
movzx ecx, word [esp + 0x10]
add dword [esp + 0x2c], 0x64
add ebx, 1
sub esi, ecx
xor edi, edi
test bl, 0x3f
mov dword [esp + 0x30], esi
jne 0x1000d670
mov eax, dword [esp + 0x2c]
xor edx, edx
div dword [esp + 0x34]
lea edx, [eax + eax*2]
add edx, edx
add edx, edx
mov eax, 0x51eb851f
mul edx
shr edx, 5
add edx, 0x32
push edx
call fcn.1000bd10
test eax, eax
jne 0x1000d670
mov dword [esp + 0x14], 0x63000009
test esi, esi
ja 0x1000d500
jmp 0x1000d6b8
mov ebp, dword [esp + 0x38]
mov dword [esp + 0x14], 7
jmp 0x1000d6b8
mov ecx, dword [esp + 0x1c]
push 0
push 0
mov eax, ebx
shl eax, 9
push eax
push ecx
mov dword [esp + 0x20], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1000d6bc
mov dword [esp + 0x14], 2
jmp 0x1000d6bc
mov dword [esp + 0x14], 6
mov dword [esp + 0x10], ebx
cmp byte [0x100250f1], 0
je 0x1000d6d7
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
call eax
mov byte [0x100250f1], 0
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x248]
jmp 0x1000d7b8
lea ecx, [esp + 0x3c]
push ecx
call fcn.1000ccf0
add esp, 4
test eax, eax
je 0x1000d73b
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x10]
push edx
push 0
push edi
push eax
push ebp
add ebx, 0xffffffff
push ebx
push esi
call fcn.1000c710
mov ebx, dword [esp + 0x2c]
add esp, 0x1c
add ebx, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
jmp 0x1000d7b8
lea ecx, [esp + 0x3c]
push ecx
call fcn.1000cef0
add esp, 4
test eax, eax
je 0x1000d77c
lea edx, [esp + 0x10]
push edx
push eax
mov eax, dword [esp + 0x20]
push 0x1001f5f4
push edi
push eax
push ebp
add ebx, 0xffffffff
push ebx
push esi
call fcn.1000c330
mov ebx, dword [esp + 0x30]
add esp, 0x20
add ebx, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
jmp 0x1000d7b8
add ebx, 1
test bl, bl
mov dword [esp + 0x10], ebx
jne 0x1000d7b8
mov eax, ebx
imul eax, eax, 0x64
xor edx, edx
div dword [esp + 0x34]
lea ecx, [eax + eax*2]
add ecx, ecx
add ecx, ecx
mov eax, 0x51eb851f
mul ecx
shr edx, 5
add edx, 0x32
push edx
call fcn.1000bd10
test eax, eax
jne 0x1000d7b8
mov dword [esp + 0x14], 0x63000009
cmp ebx, dword [esp + 0x20]
jb 0x1000d404
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call main
add esp, 0x230
ret
mov eax, 6
jmp 0x1000d7c6