Function at 0x40f950
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
push 0
push 0x10c0
push str.C:SrcStormSourceSFile.cpp
push 0x1000
mov dword [esp + 0x30], edx
mov ebp, ecx
call fcn.004089f0
xor edx, edx
mov ebx, eax
mov dword [esp + 0x14], edx
nop
lea esp, [esp]
mov eax, dword [esp + 0x14]
mov esi, dword [ebp + 0x130]
add eax, edx
cmp esi, eax
jb 0x40f9ec
mov ecx, dword [ebp + 0x10c]
push 0
push 0
push esi
push ecx
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 0x10c]
push 0
lea edx, [esp + 0x14]
push edx
push 0x1000
push ebx
push eax
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 0x20
jb 0x40fa20
mov esi, dword [ebp + 0x130]
mov edx, dword [ebp + 0x134]
lea ecx, [esi + 0x20]
cmp ecx, edx
jae 0x40fa20
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov edi, dword [ebp + 0x138]
sub esi, edx
add esi, ebx
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x138]
cmp dword [eax], 0x1a51504d
jne 0x40fa11
cmp dword [eax + 4], 0x20
jae 0x40fa5e
add dword [ebp + 0x130], 0x200
jmp 0x40f980
mov ecx, ebp
call fcn.0040c3e0
push 0
push 0xffffffffffffffff
push str.delete
push ebp
call fcn.00409b80
push 0x8510006c
call fcn.0040bec0
push 0
push 0x10dd
push str.C:SrcStormSourceSFile.cpp
push ebx
call fcn.00409b80
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 8
push 0
push 0x1104
push str.C:SrcStormSourceSFile.cpp
push ebx
call fcn.00409b80
mov edx, dword [ebp + 0x138]
mov cl, byte [edx + 0xe]
push 0
mov eax, 0x200
shl eax, cl
push 0x1109
push str.C:SrcStormSourceSFile.cpp
push eax
mov dword [ebp + 0x124], eax
call fcn.004089f0
mov dword [ebp + 0x128], eax
mov eax, dword [ebp + 0x138]
mov ecx, dword [eax + 0x18]
push 0
push 0x1112
push str.C:SrcStormSourceSFile.cpp
shl ecx, 4
push ecx
call fcn.004089f0
mov ecx, dword [ebp + 0x138]
lea esi, [ebp + 8]
push esi
mov dword [ebp + 0x140], eax
lea esi, [esp + 0x20]
push esi
mov esi, dword [ecx + 0x18]
mov ecx, dword [ecx + 0x10]
shl esi, 4
push esi
push eax
mov eax, dword [ebp + 0x10c]
push eax
mov eax, dword [ebp + 0x130]
lea edx, [ebp + 0x144]
add ecx, eax
call fcn.0040d4e0
mov ebx, str._hash_table_
mov esi, 0x7fed7fed
mov edi, 0xeeeeeeee
mov al, byte [ebx]
test al, al
je 0x40fb3b
movsx eax, al
push eax
inc ebx
call dword [sym.imp.MSVCRT.dll_toupper]
mov edx, dword [0x433a7c]
lea ecx, [edi + esi]
imul edi, edi, 0x21
movzx eax, al
mov esi, dword [edx + eax*4 + 0xc00]
xor esi, ecx
add edi, eax
add esp, 4
test ebx, ebx
lea edi, [edi + esi + 3]
jne 0x40fb05
mov eax, dword [ebp + 0x138]
mov edx, dword [eax + 0x18]
mov ecx, dword [ebp + 0x140]
push esi
shl edx, 4
call fcn.0040d3f0
mov ecx, dword [ebp + 0x138]
mov edx, dword [ecx + 0x1c]
imul edx, edx, 0x2c
push 0
push 0x1131
push str.C:SrcStormSourceSFile.cpp
push edx
call fcn.004089f0
mov ecx, dword [ebp + 0x138]
lea edx, [ebp + 8]
push edx
mov dword [ebp + 0x13c], eax
lea edx, [esp + 0x20]
push edx
mov edx, dword [ecx + 0x1c]
mov ecx, dword [ecx + 0x14]
shl edx, 4
push edx
push eax
mov eax, dword [ebp + 0x10c]
push eax
add ecx, dword [ebp + 0x130]
lea edx, [ebp + 0x144]
call fcn.0040d4e0
mov ebx, str._block_table_
mov esi, 0x7fed7fed
mov edi, 0xeeeeeeee
mov al, byte [ebx]
test al, al
je 0x40fbee
movsx eax, al
push eax
inc ebx
call dword [sym.imp.MSVCRT.dll_toupper]
mov edx, dword [0x433a7c]
lea ecx, [edi + esi]
imul edi, edi, 0x21
movzx eax, al
mov esi, dword [edx + eax*4 + 0xc00]
xor esi, ecx
add edi, eax
add esp, 4
test ebx, ebx
lea edi, [edi + esi + 3]
jne 0x40fbb8
mov eax, dword [ebp + 0x138]
mov edx, dword [eax + 0x1c]
mov ecx, dword [ebp + 0x13c]
push esi
shl edx, 4
call fcn.0040d3f0
mov ecx, dword [ebp + 0x138]
mov edx, dword [ecx + 0x1c]
mov ecx, dword [ebp + 0x13c]
call fcn.0040fd50
mov eax, dword [ebp + 0x130]
test eax, eax
je 0x40fc5f
mov edx, dword [ebp + 0x138]
mov eax, dword [edx + 0x1c]
xor esi, esi
test eax, eax
jbe 0x40fc5f
xor edx, edx
mov eax, dword [ebp + 0x13c]
mov ecx, dword [eax + edx]
add eax, edx
test ecx, ecx
je 0x40fc4e
mov edi, dword [ebp + 0x130]
add edi, ecx
mov dword [eax], edi
mov ecx, dword [ebp + 0x138]
mov eax, dword [ecx + 0x1c]
inc esi
add edx, 0x2c
cmp esi, eax
jb 0x40fc35
mov eax, dword [0x433a50]
test eax, eax
jle 0x40fc83
mov ecx, dword [ebp + 0x118]
mov edi, edi
cmp dword [eax + 0x118], ecx
jle 0x40fc85
mov eax, dword [eax + 4]
test eax, eax
jle 0x40fc83
jne 0x40fc70
jmp 0x40fc85
xor eax, eax
mov esi, dword [ebp]
test esi, esi
je 0x40fcb9
mov edx, dword [ebp + 4]
test edx, edx
jg 0x40fc97
not edx
jmp 0x40fca0
mov edi, dword [esi + 4]
mov ecx, ebp
sub ecx, edi
add edx, ecx
mov dword [edx], esi
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
mov dword [edx + 4], ecx
mov dword [ebp], 0
mov dword [ebp + 4], 0
test eax, eax
jne 0x40fcc2
mov eax, 0x433a4c
mov ecx, dword [eax]
mov dword [ebp], ecx
mov edx, dword [ecx + 4]
mov dword [ebp + 4], edx
mov dword [ecx + 4], ebp
mov dword [eax], ebp
mov eax, dword [ebp + 0x110]
test eax, eax
je 0x40fd23
call fcn.0040c520
mov eax, dword [esp + 0x2c]
push 0x4339e8
mov dword [eax], ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp + 0x138]
mov edx, dword [ecx + 0x1c]
push edx
mov edx, dword [ebp + 0x13c]
mov ecx, ebp
call fcn.0040fde0
push 0x4339e8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 8
test byte [esp + 0x20], 1
je 0x40fce1
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x40fce1
push ebp
call fcn.0040e860
push 0xf
call fcn.0040bec0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 8