Function at 0x40a8a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x4f0
push ebx
push ebp
push esi
xor ebx, ebx
push edi
push ebx
call fcn.00408fa0
mov ebp, dword [esp + 0x508]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
add esp, 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], ebx
push 1
push eax
push ebx
push ebp
call esi
push ebx
push ebx
push ebx
push ebp
mov dword [esp + 0x34], eax
call esi
mov ecx, 0x105
xor eax, eax
lea edi, [esp + 0xe9]
mov byte [esp + 0xe8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0xe8]
push 0x418
push ecx
push ebp
stosb byte es:[edi], al
call fcn.0040daf0
add esp, 0xc
mov edi, eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x20]
push ebx
push edx
push eax
push ebp
call esi
cmp edi, ebx
jne 0x40a93b
push 0x20b5
push 0xf
call fcn.00408f80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret
lea ecx, [esp + 0xe8]
push ecx
call fcn.0040dc80
add esp, 4
cmp eax, ebx
jne 0x40a96b
push 0x20bc
push 0x23
call fcn.00408f80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret
cmp eax, 3
mov dword [esp + 0x18], 1
jne 0x40ab12
mov edx, dword [esp + 0x11c]
lea eax, [esp + 0xe8]
push edx
push 0x34
push eax
call fcn.004170a0
add esp, 0xc
test eax, eax
jne 0x40a9b6
push 0x20c5
push 0x1c
call fcn.00408f80
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret
mov eax, dword [esp + 0x114]
mov ecx, dword [esp + 0x50c]
mov edi, eax
cmp ecx, eax
mov dword [esp + 0x14], edi
jae 0x40aa07
mov ecx, dword [esp + 0x510]
cmp ecx, ebx
je 0x40a9db
mov dword [ecx], eax
mov esi, dword [esp + 0x508]
cmp esi, ebx
je 0x40a9f5
push 0x20d1
push 0x20
call fcn.00408f80
add esp, 8
xor eax, eax
cmp esi, ebx
pop edi
pop esi
pop ebp
pop ebx
sete al
add esp, 0x4f0
ret
cmp eax, 0x3e0
mov dword [esp + 0x10], ebx
lea esi, [esp + 0x120]
jbe 0x40aaaf
push eax
mov dword [esp + 0x1c], ebx
call fcn.004da41d
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40af39
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push ebx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x118]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push ebp
mov dword [esp + 0x20], 1
call edi
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ebx
push ecx
push edx
push esi
push ebp
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40aa88
mov dword [esp + 0x18], 1
jmp 0x40aa97
push 0x20e9
push 0xd
call fcn.00408f80
add esp, 8
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x20]
push ebx
push eax
push ecx
push ebp
call edi
cmp dword [esp + 0x18], ebx
je 0x40aafa
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x510]
mov eax, dword [esp + 0x50c]
mov ecx, dword [esp + 0x508]
push edx
push eax
push ecx
push edi
lea edx, [esp + 0xf8]
push esi
push edx
call fcn.004146c0
add esp, 0x18
cmp eax, ebx
mov dword [esp + 0x18], eax
jne 0x40aaf0
push 0x20f5
push 0x18
call fcn.00408f80
add esp, 8
cmp dword [esp + 0x10], ebx
je 0x40af39
push esi
call fcn.004da446
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret
cmp eax, 2
je 0x40ab20
cmp eax, 1
jne 0x40af39
cmp dword [esp + 0x50c], 0x240
jae 0x40ab57
mov eax, dword [esp + 0x510]
cmp eax, ebx
je 0x40ab3e
mov dword [eax], 0x240
mov ecx, dword [esp + 0x508]
xor eax, eax
pop edi
cmp ecx, ebx
pop esi
pop ebp
sete al
pop ebx
add esp, 0x4f0
ret
mov eax, dword [esp + 0x12c]
cmp eax, ebx
je 0x40acfe
push eax
call fcn.004da41d
mov esi, eax
add esp, 4
cmp esi, ebx
mov dword [esp + 0x14], esi
je 0x40acef
mov ecx, dword [esp + 0x12c]
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push ebx
push 0x100
push ebp
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x12c]
lea eax, [esp + 0x1c]
push ebx
push eax
push ecx
push esi
push ebp
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40acd2
push 2
call fcn.00408aa0
mov edx, eax
add esp, 4
cmp edx, ebx
je 0x40acc3
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xa9]
mov byte [esp + 0xa8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, str.sdheader
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0xa8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x28], ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x10], ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x1f
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x130]
push 0x80
push eax
mov eax, dword [esp + 0x20]
push ecx
push eax
lea edi, [esp + 0xbc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov esi, dword [edx]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0xc0]
push ecx
mov ecx, edx
call dword [esi + 0x14]
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x40acae
mov eax, dword [esp + 0x508]
mov ecx, dword [esp + 0x40]
mov edx, eax
mov esi, dword [esp + 0x14]
mov dword [edx], ecx
mov ecx, dword [esp + 0x44]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x48]
mov dword [edx + 8], ecx
mov ecx, dword [esp + 0x4c]
mov dword [edx + 0xc], ecx
mov edx, dword [esp + 0x60]
mov dword [eax + 0x50], edx
jmp 0x40acd2
push 0x2136
push 0x12
call fcn.00408f80
mov esi, dword [esp + 0x1c]
add esp, 8
jmp 0x40acd2
push 0x213b
push 0xc
call fcn.00408f80
add esp, 8
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x20]
push ebx
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call fcn.004da446
add esp, 4
jmp 0x40acfe
push 0x2148
push 0x21
call fcn.00408f80
add esp, 8
mov eax, dword [esp + 0x130]
cmp eax, ebx
jbe 0x40af39
push eax
call fcn.004da41d
mov esi, eax
add esp, 4
cmp esi, ebx
mov dword [esp + 0x14], esi
je 0x40af2a
mov ecx, dword [esp + 0x130]
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push ebx
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x134]
add eax, 0x100
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x130]
lea ecx, [esp + 0x1c]
push ebx
push ecx
push edx
push esi
push ebp
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40af00
push 2
call fcn.00408aa0
mov edx, eax
add esp, 4
cmp edx, ebx
je 0x40aef1
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0xa9]
mov byte [esp + 0xa8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, str.sdheader
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0xa8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x28], ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x10], ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x1f
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
lea eax, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x130]
push 0x80
push eax
mov eax, dword [esp + 0x20]
push ecx
push eax
lea edi, [esp + 0xbc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov esi, dword [edx]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0xc0]
push ecx
mov ecx, edx
call dword [esi + 0x14]
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x40aedc
mov eax, dword [esp + 0x508]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x60]
mov ecx, dword [esp + 0x44]
mov dword [eax + 0x228], edx
mov edx, dword [esp + 0x48]
mov dword [eax + 0x230], edx
mov esi, 1
xor edx, edx
cmp edi, esi
mov edi, dword [esp + 0x68]
mov dword [eax + 0x22c], ecx
mov ecx, dword [esp + 0x4c]
mov dword [eax + 0x214], esi
setne dl
mov dword [eax + 0x1f0], edx
mov edx, dword [esp + 0x64]
mov dword [eax + 0x234], ecx
xor ecx, ecx
cmp edx, esi
mov dword [eax + 0x1f8], esi
setne cl
xor edx, edx
cmp edi, esi
mov edi, dword [esp + 0x70]
mov dword [eax + 0x1fc], ecx
setne dl
mov dword [eax + 0x208], edx
mov edx, dword [esp + 0x6c]
xor ecx, ecx
cmp edx, esi
setne cl
xor edx, edx
cmp edi, esi
setne dl
mov dword [eax + 0x20c], edx
mov edx, dword [esp + 0x74]
mov dword [eax + 0x1f4], ecx
xor ecx, ecx
cmp edx, esi
mov esi, dword [esp + 0x14]
setne cl
mov dword [eax + 0x210], ecx
jmp 0x40af00
push 0x2177
push 0x12
call fcn.00408f80
mov esi, dword [esp + 0x1c]
add esp, 8
jmp 0x40af00
push 0x217c
push 0xc
call fcn.00408f80
add esp, 8
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x20]
push ebx
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call fcn.004da446
mov eax, dword [esp + 0x1c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret
push 0x2188
push 0x21
call fcn.00408f80
add esp, 8
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4f0
ret