Function at 0x10001580
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x308
mov eax, dword [0x10030190]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor eax, eax
push eax
push 0x80000020
push 3
push eax
push 1
push 0x80000000
push 0x1050f030
mov dword [0x100316e0], eax
mov dword [0x10031b14], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov eax, dword [0x1063e274]
push 0
shl ebx, 5
mov ecx, dword [ebx + eax + 0xc]
push 0
push ecx
push edi
mov dword [ebp - 0x2e8], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x1063e274]
xor edx, edx
xor esi, esi
cmp dx, word [ebx + eax + 0x1c]
jae 0x1000161b
push 0
movzx eax, si
push 0x10156d38
lea ecx, [eax + eax*4]
push 0xa
lea edx, [ebp + ecx*2 - 0x2d4]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x1063e274]
inc esi
cmp si, word [ebx + eax + 0x1c]
jb 0x100015f0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x1063e274]
mov cx, word [ebx + eax + 0x14]
mov word [0x105ab654], cx
mov dx, word [ebx + eax + 0x16]
mov word [0x10584438], dx
nop
test byte [0x105ab654], 3
je 0x10001652
inc word [0x105ab654]
jmp 0x10001640
mov eax, dword [0x10584438]
imul eax, dword [0x105ab654]
movzx ebx, ax
push 0x428
push 0x42
mov dword [ebp - 0x2f0], ebx
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
mov dword [ebp - 0x300], eax
call edi
cmp dword [0x106e9594], 0
mov esi, eax
mov dword [esi], 0x28
movzx ecx, word [0x105ab654]
mov dword [esi + 4], ecx
movzx edx, word [0x10584438]
mov dword [ebp - 0x2f4], esi
mov dword [esi + 8], edx
mov dword [esi + 0xc], 0x80001
jne 0x100016fd
mov edx, dword [0x105ab650]
push edx
call edi
mov ecx, 0x1063e2c1
add eax, 5
movzx edx, byte [eax - 1]
mov byte [ecx + 1], dl
movzx edx, byte [eax]
mov byte [ecx], dl
movzx edx, byte [eax + 1]
mov byte [ecx - 1], dl
add ecx, 4
add eax, 4
cmp ecx, 0x1063e6c1
jl 0x100016c6
mov eax, dword [0x105ab650]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov dword [0x106e9594], 1
mov eax, 0x1063e2c0
lea ecx, [esi + 0x28]
mov edx, dword [eax]
mov dword [ecx], edx
add eax, 4
add ecx, 4
cmp eax, 0x1063e6c0
jl 0x10001705
movzx eax, bx
push eax
push 0x40
mov dword [ebp - 0x2d8], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push ebx
mov dword [ebp - 0x2f8], ebx
call edi
mov ecx, dword [ebp - 0x2d8]
push ecx
push 0x56
push eax
mov dword [ebp - 0x2ec], eax
call fcn.1000cdc0
mov eax, dword [0x1063e274]
mov ecx, dword [ebp - 0x2e8]
xor edx, edx
add esp, 0xc
mov dword [ebp - 0x2e4], 0
cmp dx, word [ecx + eax + 0x1c]
jae 0x10001956
jmp 0x10001776
mov edi, dword [sym.imp.KERNEL32.dll_GlobalLock]
movzx ebx, word [ebp - 0x2e4]
lea ebx, [ebx + ebx*4]
add ebx, ebx
movsx eax, word [ebp + ebx - 0x2d0]
lea edx, [eax + eax*2]
mov eax, dword [0x105ab61c]
lea ecx, [eax + edx*4]
push ecx
mov dword [ebp - 0x308], ebx
call fcn.100010c8
mov edx, dword [0x105ab568]
lea esi, [eax + eax*2]
add esi, esi
add esi, esi
add esp, 4
add esi, esi
mov eax, dword [esi + edx + 4]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebp - 0x2fc], eax
call edi
push 0
push 0x80000020
push 3
push 0
push 1
push 0x80000000
push 0x1050f030
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [0x105ab568]
mov edx, dword [esi + ecx]
push 0
push 0
push edx
push eax
mov dword [ebp - 0x2d8], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x105ab568]
mov ecx, dword [esi + eax + 4]
mov esi, dword [ebp - 0x2d8]
push 0
push 0x10156d38
push ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx edx, word [edi]
xor eax, eax
mov dword [ebp - 0x304], edx
mov dword [ebp - 0x2e0], 0
cmp ax, dx
jae 0x10001912
lea ecx, [edi + 8]
mov dword [ebp - 0x2dc], ecx
mov eax, dword [ebp - 0x2dc]
mov eax, dword [eax]
mov cl, byte [eax + edi]
cmp cl, 0xff
je 0x100018f5
jmp 0x10001870
mov dx, word [0x10584438]
movzx ecx, cl
sub dx, cx
movzx ecx, byte [eax + edi + 1]
sub dx, word [ebp + ebx - 0x2d2]
xor esi, esi
add eax, 3
movzx edx, dx
cmp si, cx
jae 0x100018e5
mov dword [ebp - 0x2d8], ecx
lea ecx, [ecx]
mov ecx, dword [0x105ab654]
add edx, 0xffff
imul ecx, edx
add cx, word [ebp + ebx - 0x2d4]
add cx, word [ebp - 0x2e0]
movzx ecx, cx
cmp cx, word [ebp - 0x2f0]
jae 0x100018dc
mov bl, byte [eax + edi]
mov esi, dword [ebp - 0x2ec]
mov byte [ecx + esi], bl
mov ebx, dword [ebp - 0x308]
inc eax
dec dword [ebp - 0x2d8]
jne 0x100018a0
mov cl, byte [eax + edi + 1]
inc eax
cmp cl, 0xff
jne 0x10001870
mov edx, dword [ebp - 0x304]
mov eax, dword [ebp - 0x2e0]
add dword [ebp - 0x2dc], 4
inc eax
mov dword [ebp - 0x2e0], eax
cmp ax, dx
jb 0x10001850
mov esi, dword [ebp - 0x2fc]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x2e4]
mov edx, dword [0x1063e274]
mov ecx, dword [ebp - 0x2e8]
inc eax
mov dword [ebp - 0x2e4], eax
cmp ax, word [ecx + edx + 0x1c]
jb 0x10001770
mov esi, dword [ebp - 0x2f4]
mov ebx, dword [ebp - 0x2f8]
mov edx, dword [0x10584424]
push edx
call dword [sym.imp.USER32.dll_GetDC]
push 0
push esi
mov edi, eax
mov eax, dword [ebp - 0x2ec]
push eax
push 4
push esi
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov ecx, dword [0x10584424]
push edi
push ecx
mov esi, eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edi, dword [ebp - 0x300]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
call edi
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call edi
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000cdb1
mov esp, ebp
pop ebp
ret