Function at 0x437550
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x38
push ebx
mov ebx, dword [esp + 0x40]
push ebp
push esi
mov al, byte [ebx + 0xc]
mov esi, ecx
test al, 0x10
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], 0
jne 0x437f10
push ebx
push 1
lea eax, [esp + 0x1a]
push 2
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
lea ecx, [esp + 0x12]
push 2
push ecx
mov ecx, esi
call fcn.00435b20
movsx eax, ax
cmp eax, 3
ja case.default.0x4375a1
jmp dword [eax*4 + 0x437f20]
movsx eax, word [esi + 0x14]
mov ecx, dword [esi + 0xc]
mov edi, dword [esi + 0x10]
mov dword [esp + 0x3c], ecx
imul ecx, edi
cdq
and edx, 7
mov dword [esp + 0x2c], ecx
add eax, edx
mov dword [esp + 0x40], edi
mov ebp, eax
movsx eax, word [esi + 8]
imul eax, ecx
sar ebp, 3
mov ecx, eax
imul ecx, ebp
mov dword [esp + 0x1c], ecx
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
movsx ecx, word [esi + 0x16]
dec ecx
cmp ecx, 8
ja case.0x4375f4.5
jmp dword [ecx*4 + 0x437f30]
mov edx, dword [esp + 0x1c]
push edx
call sub.MFC42.DLL_operatornew
mov edi, eax
push ebp
mov dword [esp + 0x20], edi
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x54], eax
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x4c]
mov ecx, ebp
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
test byte [ebx + 0xc], 0x10
jne 0x4376b7
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
cmp eax, ecx
jge 0x4376b7
mov esi, dword [esp + 0x4c]
mov ecx, ebp
mov edx, ecx
mov eax, 0xfefefefe
mov edi, esi
push ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 1
and ecx, 3
push ebp
rep stosb byte es:[edi], al
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ecx, ebp
add edi, edx
mov edx, ecx
add esp, 0x10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
mov esi, dword [esp + 0x20]
imul ecx, eax
mov al, byte [ebx + 0xc]
add edx, ecx
test al, 0x10
mov dword [esp + 0x14], edx
je 0x43764e
mov eax, dword [esp + 0x4c]
test eax, eax
je case.0x4375f4.5
jmp 0x437aa4
mov edx, dword [esp + 0x1c]
push edx
call sub.MFC42.DLL_operatornew
mov edi, eax
push ebp
mov dword [esp + 0x20], edi
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x54], eax
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x4c]
mov ecx, ebp
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
test byte [ebx + 0xc], 0x10
jne 0x437784
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
cmp eax, ecx
jge 0x437784
mov esi, dword [esp + 0x4c]
mov ecx, ebp
mov edx, ecx
mov eax, 0xfefefefe
mov edi, esi
push ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 1
and ecx, 3
push ebp
rep stosb byte es:[edi], al
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov ecx, ebp
add edi, edx
mov edx, ecx
add esp, 0x10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
mov esi, dword [esp + 0x20]
imul ecx, eax
mov al, byte [ebx + 0xc]
add edx, ecx
test al, 0x10
mov dword [esp + 0x14], edx
je 0x43771b
mov eax, dword [esp + 0x4c]
test eax, eax
je case.0x4375f4.5
jmp 0x437aa4
cmp ebp, 2
mov dword [esp + 0x28], ebp
jne 0x4377aa
mov dword [esp + 0x28], 1
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x28]
push edx
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x20]
mov dword [esp + 0x50], eax
push edi
call sub.MFC42.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [esp + 0x20], edx
mov edi, edx
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x4c]
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x2c]
xor ecx, ecx
mov dword [esp + 0x38], ecx
test eax, eax
jle 0x437899
mov edx, dword [esp + 0x18]
mov dword [esp + 0x34], eax
add ecx, edx
mov dword [esp + 0x30], ecx
test byte [ebx + 0xc], 0x10
jne 0x437886
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x4c]
push ebx
push 1
push edi
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, edi
mov edi, dword [esp + 0x40]
mov edx, ecx
add esp, 0x10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
mov edx, dword [esp + 0x14]
imul ecx, eax
add edx, ecx
mov ecx, dword [esp + 0x30]
add ecx, 3
cmp ebp, 2
mov dword [esp + 0x14], edx
mov dword [esp + 0x30], ecx
jne 0x437882
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x4c]
push ebx
push 1
push edx
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
dec eax
mov dword [esp + 0x34], eax
jne 0x43781d
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
inc ecx
cmp ecx, 3
mov dword [esp + 0x38], ecx
jl 0x437807
mov eax, dword [esp + 0x4c]
test eax, eax
je case.0x4375f4.5
mov ecx, eax
push ecx
jmp 0x437aa5
push ebp
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x20]
mov dword [esp + 0x50], eax
push edi
call sub.MFC42.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [esp + 0x20], edx
mov edi, edx
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
mov dword [esp + 0x28], 0
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x4c]
mov ecx, ebp
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x34], 4
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x437987
mov dword [esp + 0x38], eax
test byte [ebx + 0xc], 0x10
jne 0x43797c
mov esi, dword [esp + 0x4c]
push ebx
push 1
push ebp
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x28]
mov ecx, ebp
add edi, edx
mov edx, ecx
add esp, 0x10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
mov esi, dword [esp + 0x20]
imul ecx, eax
mov eax, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x14], eax
lea eax, [edx + ebp*4]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x38]
dec eax
mov dword [esp + 0x38], eax
jne 0x43792c
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
add ecx, ebp
dec eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x34], eax
jne 0x437918
mov eax, dword [esp + 0x4c]
test eax, eax
je case.0x4375f4.5
mov ecx, eax
push ecx
jmp 0x437aa5
push ebp
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x20]
mov dword [esp + 0x50], eax
push edi
call sub.MFC42.DLL_operatornew
mov edx, eax
mov ecx, edi
mov dword [esp + 0x20], edx
mov edi, edx
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
mov dword [esp + 0x28], 0
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x4c]
mov ecx, ebp
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x34], 3
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
test eax, eax
jle 0x437a83
mov dword [esp + 0x38], eax
test byte [ebx + 0xc], 0x10
jne 0x437a78
mov esi, dword [esp + 0x4c]
push ebx
push 1
push ebp
push esi
call dword [sym.imp.MSVCRT.dll_fread]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x28]
mov ecx, ebp
add edi, edx
mov edx, ecx
add esp, 0x10
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x30]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
mov esi, dword [esp + 0x20]
imul ecx, eax
mov eax, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x14], eax
lea eax, [edx + ebp]
lea ecx, [eax + ebp*2]
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x38]
dec eax
mov dword [esp + 0x38], eax
jne 0x437a25
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x34]
add ecx, ebp
dec eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x34], eax
jne 0x437a11
mov eax, dword [esp + 0x4c]
test eax, eax
je case.0x4375f4.5
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
cmp eax, edx
jne 0x437b84
test ebx, ebx
je 0x437f10
mov al, byte [esi + 0x50]
mov edi, 0xec4
test al, al
mov edx, edi
je 0x437b25
movsx eax, word [esi + 0x3c]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, 0x81020409
shl ecx, 4
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, word [esi + 0x46]
mov edi, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, 0x81020409
shl ecx, 4
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
movsx eax, word [esi + 0x14]
dec eax
je 0x437b57
sub eax, 7
je 0x437b40
sub eax, 8
je 0x437b40
mov dword [esp + 0x24], 0xfffffff8
jmp 0x437b5f
mov eax, dword [esp + 0x40]
push 0x18
push edx
mov edx, dword [esp + 0x44]
push edi
push edx
push eax
mov ecx, esi
call fcn.00435e30
jmp 0x437b5f
mov dword [esp + 0x24], 0xfffffff9
mov eax, dword [esi]
push ebx
test eax, eax
jne 0x437b7d
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 0xfffffff7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4
mov ecx, esi
call fcn.004369f0
test ebx, ebx
je 0x437f10
push ebx
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x28]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4
mov ecx, dword [esi + 0xc]
mov edi, dword [esi + 0x10]
mov dword [esp + 0x14], ecx
imul ecx, edi
movsx ebp, word [esi + 8]
movsx eax, word [esi + 0x14]
imul ebp, ecx
cdq
and edx, 7
mov dword [esp + 0x44], edi
add eax, edx
mov dword [esp + 0x2c], ecx
sar eax, 3
imul ebp, eax
push ebp
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ebp
call sub.MFC42.DLL_operatornew
mov ecx, ebp
mov edi, eax
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
mov dword [esp + 0x1c], edi
push 1
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
movsx eax, word [esi + 8]
imul eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
shl eax, 1
push eax
push ebx
mov dword [esp + 0x38], edi
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0x10
cmp word [esi + 8], 0
mov dword [esp + 0x38], 0
jle 0x437d39
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], 0
test eax, eax
jle 0x437d24
push ebx
push 1
lea ecx, [esp + 0x54]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
lea edx, [esp + 0x4c]
mov ecx, esi
push 1
push edx
call fcn.00435b20
cmp eax, 0x80
jge 0x437ca9
mov edx, dword [esp + 0x1c]
inc eax
add edx, eax
test eax, eax
mov dword [esp + 0x1c], edx
je 0x437d10
mov ebp, eax
push ebx
push 1
lea eax, [esp + 0x54]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
lea ecx, [esp + 0x4c]
push 1
push ecx
mov ecx, esi
call fcn.00435b20
mov byte [edi], al
inc edi
dec ebp
jne 0x437c7c
mov dword [esp + 0x28], edi
jmp 0x437d10
jle 0x437d10
xor eax, 0xff
push ebx
push 1
lea edx, [esp + 0x54]
add eax, 2
push 1
push edx
mov ebp, eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
lea eax, [esp + 0x4c]
mov ecx, esi
push 1
push eax
call fcn.00435b20
mov edx, dword [esp + 0x1c]
add edx, ebp
test ebp, ebp
mov dword [esp + 0x1c], edx
je 0x437d0c
mov edi, dword [esp + 0x28]
mov dl, al
mov dh, dl
mov ecx, ebp
mov eax, edx
mov esi, ecx
shl eax, 0x10
mov ax, dx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
mov esi, dword [esp + 0x20]
and ecx, 3
rep stosb byte es:[edi], al
add dword [esp + 0x28], ebp
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
cmp eax, ecx
jl 0x437c3f
mov ebp, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
movsx ecx, word [esi + 8]
inc eax
cmp eax, ecx
mov dword [esp + 0x38], eax
jl 0x437c2b
mov ebx, dword [esp + 0x18]
push ebp
call sub.MFC42.DLL_operatornew
mov ecx, ebp
mov edi, eax
mov edx, ecx
mov eax, 0xfefefefe
shr ecx, 2
mov dword [esp + 0x2c], edi
add esp, 4
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x34], 0
and ecx, 3
rep stosb byte es:[edi], al
cmp word [esi + 8], 0
jle 0x437de1
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x30]
test ecx, ecx
jle 0x437dc2
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 0x28]
mov ecx, ebp
mov esi, ebx
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
movsx edx, word [ecx + 8]
imul edx, ebp
mov ecx, dword [esp + 0x38]
add eax, edx
dec ecx
mov dword [esp + 0x38], ecx
jne 0x437d8c
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x34]
add edx, ebp
mov dword [esp + 0x30], edx
inc eax
movsx edx, word [esi + 8]
cmp eax, edx
mov dword [esp + 0x34], eax
jl 0x437d80
mov eax, dword [esp + 0x18]
test eax, eax
je 0x437df2
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x28]
test eax, eax
je 0x437f10
mov al, byte [esi + 0x50]
mov edi, 0xec4
test al, al
mov edx, edi
je 0x437e5a
movsx eax, word [esi + 0x3c]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, 0x81020409
lea ecx, [ecx + ecx*4]
shl ecx, 4
imul ecx
add edx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, word [esi + 0x46]
mov edi, edx
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, 0x81020409
lea ecx, [ecx + ecx*4]
shl ecx, 4
imul ecx
add edx, ecx
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
movsx eax, word [esi + 0x14]
dec eax
je 0x437e8c
sub eax, 7
je 0x437e75
sub eax, 8
je 0x437e75
mov dword [esp + 0x24], 0xfffffff8
jmp 0x437e94
mov eax, dword [esp + 0x44]
push 0x18
push edx
mov edx, dword [esp + 0x1c]
push edi
push edx
push eax
mov ecx, esi
call fcn.00435e30
jmp 0x437e94
mov dword [esp + 0x24], 0xfffffff9
cmp dword [esi], 0
jne 0x437eb5
mov ecx, dword [esp + 0x28]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 0xfffffff7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4
mov edx, dword [esp + 0x28]
mov ecx, esi
push edx
call fcn.004369f0
mov eax, dword [esp + 0x28]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x28]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4
pop edi
mov dword [esp + 0x20], 0xfffffff6
mov eax, dword [esp + 0x20]
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4
pop edi
mov dword [esp + 0x20], 0xfffffff5
mov eax, dword [esp + 0x20]
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4
mov dword [esp + 0x24], 0xfffffff4
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 4