Function at 0x1002fddd
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + 4]
xor ebx, ebx
cmp dword [edi + 0xb4], ebx
mov byte [ebp - 7], 0
mov dword [ebp - 0x24], edi
mov byte [ebp - 0xb], bl
jl 0x1002fb9a
mov eax, dword [ebp + 0xc]
push eax
push 0xffffffffffffffff
push esi
push edi
call fcn.10040390
mov ecx, dword [ebp + 0xc]
add esp, 0x10
cmp dword [ecx], ebx
jg 0x10030616
cmp byte [edi + 0xfd], bl
jl 0x10030616
mov eax, dword [edi + 0x18]
mov cl, byte [eax + 0xcc]
mov dl, byte [eax + 0xcd]
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
test cl, cl
jne 0x1002fbe6
test dl, 2
jne 0x1002fc07
test dl, 1
jne 0x1002fbd1
mov edx, dword [ebp + 0xc]
push edx
push esi
call fcn.1002f8c0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
push eax
mov ebx, esi
call fcn.1002f6c0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp cl, 1
jne 0x1002fc07
cmp byte [eax + 0xce], bl
je 0x1002fc07
mov ecx, dword [ebp + 0xc]
push ecx
push esi
call fcn.1002f3b0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 8]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 0x10]
sub ecx, eax
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x18]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov eax, dword [edi + 0x18]
mov edx, dword [eax + 0x38]
mov dword [ebp - 0x4c], edx
cmp byte [eax + 0xce], bl
je 0x1002fc40
mov ecx, dword [eax + 0x3c]
mov dword [ebp - 0x44], ecx
jmp 0x1002fc43
mov dword [ebp - 0x44], ebx
mov ecx, dword [edi + 0x1c]
test cl, 0x10
je 0x1002fc53
mov edx, dword [eax + 0xc4]
jmp 0x1002fc59
mov edx, dword [eax + 0xc0]
cmp byte [ebp - 1], 0xc
mov eax, dword [eax + 0xd4]
mov dword [ebp - 0x18], edx
mov edx, dword [edi + 0x38]
mov dword [ebp - 0x48], eax
jne 0x1002fc81
mov edi, dword [edi + 0x34]
mov dword [ebp - 0x1c], edi
test edi, edi
jne 0x1002fc84
mov dword [ebp - 0x1c], 1
jmp 0x1002fc84
mov dword [ebp - 0x1c], ebx
mov edi, edx
neg edi
sbb edi, edi
mov dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x2c], ebx
test ecx, 0x1000
je 0x1002fcb0
mov byte [ebp - 8], 0xa
mov byte [ebp - 7], 0x41
mov dword [ebp - 0x30], 2
jmp 0x1002fce2
test ecx, 0x2000
je 0x1002fcbe
mov byte [ebp - 8], 0x29
jmp 0x1002fcdb
test ecx, 0x4000
je 0x1002fcd7
mov byte [ebp - 8], 0x1a
mov byte [ebp - 7], 0x71
mov dword [ebp - 0x30], 2
jmp 0x1002fce2
mov byte [ebp - 8], 0xf
mov dword [ebp - 0x30], 1
test ecx, 0x1000
je 0x1002fcfb
mov byte [ebp - 0xc], 0xa
mov byte [ebp - 0xb], 0x42
mov dword [ebp - 0x38], 2
jmp 0x1002fd2d
test ecx, 0x2000
je 0x1002fd09
mov byte [ebp - 0xc], 0x28
jmp 0x1002fd26
test ecx, 0x4000
je 0x1002fd22
mov byte [ebp - 0xc], 0x1a
mov byte [ebp - 0xb], 0x70
mov dword [ebp - 0x38], 2
jmp 0x1002fd2d
mov byte [ebp - 0xc], 0xe
mov dword [ebp - 0x38], 1
test edx, edx
je 0x1002fd3a
cmp dword [ebp - 0x20], ebx
jg 0x100300a2
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x3c]
jae 0x10030628
cmp dword [ebp - 0x20], 0
jle 0x1003061d
movzx edx, word [eax]
inc dword [ebp - 0x2c]
add eax, 2
cmp edx, 0x7f
mov dword [ebp - 0x28], eax
jg 0x1002fd9e
mov ecx, edx
sar ecx, 2
mov esi, 1
shl esi, cl
mov ecx, dword [ebp - 0x48]
test ecx, esi
je 0x1002fd9e
mov eax, dword [ebp - 0x10]
mov byte [eax], dl
mov eax, dword [ebp - 0x14]
mov ecx, 1
add dword [ebp - 0x10], ecx
test eax, eax
je 0x1002fd97
mov dword [eax], edi
add dword [ebp - 0x14], 4
mov dword [ebp - 0x40], edi
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x34], edi
sub dword [ebp - 0x20], ecx
xor edx, edx
jmp 0x1002fd3a
cmp edx, 0xd7ff
jg 0x10030073
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x10030073
mov eax, edx
sar eax, 6
movzx eax, word [ecx + eax*2]
movzx ecx, byte [ebp - 1]
dec ecx
cmp ecx, 0xda
ja case.0x1002fdd6.4
movzx ecx, byte [ecx + 0x10030700]
jmp dword [ecx*4 + 0x100306e0]
mov ecx, edx
and ecx, 0x3f
add ecx, eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + ecx*2]
cmp eax, 0xff
ja 0x1002fef6
test eax, eax
je 0x100303ff
mov ebx, 1
jmp 0x10030482
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
mov dword [esi + 0x34], ecx
mov esi, edx
and esi, 0x3f
add esi, eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + esi*2]
cmp eax, 0xff
ja 0x1002fe87
test eax, eax
je 0x100303ff
cmp ecx, 1
jg 0x1002fe3d
mov ebx, 1
jmp 0x10030482
mov cl, byte [ebp - 0x30]
cmp cl, 1
jne 0x1002fe5f
movzx ecx, byte [ebp - 8]
shl ecx, 8
or eax, ecx
mov ebx, 2
mov dword [ebp - 0x1c], 1
jmp 0x10030482
cmp cl, 2
jne 0x1002fe7b
movzx edx, byte [ebp - 8]
movzx ecx, byte [ebp - 7]
shl edx, 8
or edx, ecx
shl edx, 8
or eax, edx
mov ebx, 3
mov dword [ebp - 0x1c], 1
jmp 0x10030482
cmp ecx, 2
jne 0x1002fe93
mov ebx, ecx
jmp 0x10030482
mov cl, byte [ebp - 0x38]
cmp cl, 1
jne 0x1002feb5
movzx edx, byte [ebp - 0xc]
shl edx, 0x10
or eax, edx
mov ebx, 3
mov dword [ebp - 0x1c], 2
jmp 0x10030482
cmp cl, 2
jne 0x1002fed1
movzx ecx, byte [ebp - 0xc]
movzx edx, byte [ebp - 0xb]
shl ecx, 8
or ecx, edx
shl ecx, 0x10
or eax, ecx
mov ebx, 4
mov dword [ebp - 0x1c], 2
jmp 0x10030482
mov ecx, edx
and ecx, 0x3f
add ecx, eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + ecx*2]
cmp eax, 0xff
jbe 0x100303ff
mov ebx, 2
jmp 0x10030482
mov ecx, edx
and ecx, 0x3f
add ecx, eax
mov eax, dword [ebp - 0x18]
lea esi, [eax + ecx*2]
movzx eax, byte [esi + ecx]
add esi, ecx
movzx ecx, byte [esi + 1]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi + 2]
shl eax, 8
or eax, ecx
cmp eax, 0xff
ja 0x1002ff3e
test eax, eax
je 0x100303ff
mov ebx, 1
jmp 0x10030482
mov edx, 0xffff
cmp edx, eax
sbb ebx, ebx
neg ebx
add ebx, 2
jmp 0x10030482
mov ecx, edx
and ecx, 0x3f
add ecx, eax
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + ecx*4]
cmp eax, 0xff
ja 0x1002ff77
test eax, eax
je 0x100303ff
mov ebx, 1
jmp 0x10030482
cmp eax, 0xffff
ja 0x1002ff88
mov ebx, 2
jmp 0x10030482
mov ecx, 0xffffff
cmp ecx, eax
sbb ebx, ebx
neg ebx
add ebx, 3
jmp 0x10030482
mov ecx, edx
and ecx, 0x3f
add ecx, eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + ecx*2]
cmp eax, 0xff
ja 0x1002ffc2
test eax, eax
je 0x100303ff
mov ebx, 1
jmp 0x10030482
test eax, 0x8000
jne 0x1002ffd8
or eax, 0x8e8000
mov ebx, 3
jmp 0x10030482
test al, al
js 0x1002fef6
or eax, 0x8f0080
mov ebx, 3
jmp 0x10030482
mov ecx, edx
and ecx, 0x3f
add ecx, eax
mov eax, dword [ebp - 0x18]
lea esi, [eax + ecx*2]
movzx eax, byte [esi + ecx]
add esi, ecx
movzx ecx, byte [esi + 1]
shl eax, 8
or eax, ecx
movzx ecx, byte [esi + 2]
shl eax, 8
or eax, ecx
cmp eax, 0xff
ja 0x1003002d
test eax, eax
je 0x100303ff
mov ebx, 1
jmp 0x10030482
cmp eax, 0xffff
ja 0x1003003e
mov ebx, 2
jmp 0x10030482
test eax, 0x800000
jne 0x10030054
or eax, 0x8e800000
mov ebx, 4
jmp 0x10030482
test eax, 0x8000
jne 0x1002ffe5
or eax, 0x8f008000
mov ebx, 4
jmp 0x10030482
xor eax, eax
xor ebx, ebx
jmp 0x10030482
mov ecx, edx
and ecx, 0xfffff800
cmp ecx, 0xd800
jne 0x100300ee
test byte [ebp - 2], 2
jne 0x100300ee
mov esi, dword [ebp + 8]
test edx, 0x400
je 0x100300a5
mov eax, dword [ebp + 0xc]
mov dword [eax], 0xc
jmp 0x100305f8
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x3c]
jae 0x1003062b
mov eax, dword [ebp - 0x28]
movzx eax, word [eax]
mov ecx, eax
and ecx, 0xfffffc00
cmp ecx, 0xdc00
jne 0x10030543
add dword [ebp - 0x28], 2
inc dword [ebp - 0x2c]
add edx, 0xffff2809
shl edx, 0xa
add edx, eax
test byte [ebp - 2], 1
jne 0x100300ee
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 0x34], eax
jmp 0x100303ff
mov eax, dword [ebp - 0x4c]
mov ecx, edx
sar ecx, 0xa
movzx ecx, word [eax + ecx*2]
mov esi, edx
sar esi, 4
and esi, 0x3f
add ecx, esi
mov esi, dword [eax + ecx*4]
movzx eax, byte [ebp - 1]
dec eax
cmp eax, 0xda
ja case.0x1003011e.4
movzx eax, byte [eax + 0x100307fc]
jmp dword [eax*4 + 0x100307dc]
dec ebp
or al, 0x8a
adc dword [eax + 0x8458b10], ecx
inc esi
add byte [edx + 3], ch
rol dword [0xfc08510], 1
test byte [edx + 1], ch
add byte [eax], al
adc byte [eax], al
fmul dword [ebx + 0x5d2a035]
adc byte [ebp + 0x55500143], cl
add byte [eax], al
cmp dword [ebp - 0x14], 0
je 0x1002fd3a
mov dword [ebp - 0x40], edi
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x34], edi
jmp 0x1002fd3a
cmp ebx, dword [ebp - 0x20]
jg 0x10030551
cmp dword [ebp - 0x14], 0
lea ecx, [ebx - 1]
jne 0x100304da
cmp ecx, 3
ja case.default.0x100304df
jmp dword [ecx*4 + 0x100308d8]
mov ecx, dword [ebp - 0x10]
mov edx, eax
shr edx, 0x18
mov byte [ecx], dl
inc dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, eax
shr edx, 0x10
mov byte [ecx], dl
inc dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, eax
shr edx, 8
mov byte [ecx], dl
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
sub dword [ebp - 0x20], ebx
mov byte [edx], al
inc dword [ebp - 0x10]
xor edx, edx
jmp 0x10030467
cmp ecx, 3
ja case.default.0x100304df
jmp dword [ecx*4 + 0x100308e8]
mov edx, dword [ebp - 0x10]
mov ecx, eax
shr ecx, 0x18
mov byte [edx], cl
mov ecx, dword [ebp - 0x14]
inc dword [ebp - 0x10]
mov dword [ecx], edi
add dword [ebp - 0x14], 4
mov ecx, dword [ebp - 0x10]
mov edx, eax
shr edx, 0x10
mov byte [ecx], dl
mov edx, dword [ebp - 0x14]
inc dword [ebp - 0x10]
mov dword [edx], edi
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x10]
mov ecx, eax
shr ecx, 8
mov byte [edx], cl
mov ecx, dword [ebp - 0x14]
inc dword [ebp - 0x10]
mov dword [ecx], edi
add dword [ebp - 0x14], 4
mov edx, dword [ebp - 0x10]
mov byte [edx], al
mov eax, dword [ebp - 0x14]
inc dword [ebp - 0x10]
mov dword [eax], edi
add dword [ebp - 0x14], 4
sub dword [ebp - 0x20], ebx
xor edx, edx
jmp 0x10030467
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0xc
jmp 0x100305f8
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
sub ebx, edx
mov ecx, ebx
add esi, 0x4c
sub ecx, 1
je 0x1003057d
sub ecx, 1
je 0x10030575
sub ecx, 1
jne 0x1003057f
mov ecx, eax
shr ecx, 0x10
mov byte [esi], cl
inc esi
mov ecx, eax
shr ecx, 8
mov byte [esi], cl
inc esi
mov byte [esi], al
mov ecx, dword [ebp - 0x24]
mov byte [ecx + 0x3f], bl
lea ecx, [ebx*8]
shr eax, cl
mov ecx, edx
mov edx, 1
sub ecx, edx
je 0x100305d5
sub ecx, edx
je 0x100305bb
sub ecx, edx
jne 0x100305ea
mov esi, dword [ebp - 0x10]
mov ecx, eax
shr ecx, 0x10
mov byte [esi], cl
mov ecx, dword [ebp - 0x14]
add dword [ebp - 0x10], edx
test ecx, ecx
je 0x100305bb
mov dword [ecx], edi
add dword [ebp - 0x14], 4
mov esi, dword [ebp - 0x10]
mov ecx, eax
shr ecx, 8
mov byte [esi], cl
mov ecx, dword [ebp - 0x14]
add dword [ebp - 0x10], edx
test ecx, ecx
je 0x100305d5
mov dword [ecx], edi
add dword [ebp - 0x14], 4
mov ecx, dword [ebp - 0x10]
mov byte [ecx], al
mov eax, dword [ebp - 0x14]
add dword [ebp - 0x10], edx
test eax, eax
je 0x100305ea
mov dword [eax], edi
add dword [ebp - 0x14], 4
mov edx, dword [ebp + 0xc]
mov dword [edx], 0xf
xor edx, edx
mov esi, dword [ebp + 8]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x38], edx
mov dword [eax + 0x34], ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [esi + 8], edx
mov dword [esi + 0x10], eax
mov dword [esi + 0x18], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [eax], 0xf
jmp 0x100305f5
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], 0
mov al, byte [ebp - 0x30]
jg 0x100305f8
cmp byte [ebp - 1], 0xc
jne 0x100305f8
cmp dword [ebp - 0x1c], 2
jne 0x100305f8
cmp byte [esi + 2], 0
je 0x100305f8
mov ecx, dword [ebp - 0x3c]
cmp dword [ebp - 0x28], ecx
jb 0x100305f8
test edx, edx
jne 0x100305f8
mov edi, dword [ebp - 0x20]
test edi, edi
jle 0x100306b3
mov ecx, dword [ebp - 0x10]
mov bl, byte [ebp - 8]
mov byte [ecx], bl
mov ecx, 1
add dword [ebp - 0x10], ecx
cmp al, 2
jne 0x10030697
cmp edi, 2
jge 0x1003068c
mov eax, dword [ebp - 0x24]
mov cl, byte [ebp - 7]
mov byte [eax + 0x4c], cl
mov byte [eax + 0x3f], 1
mov eax, dword [ebp + 0xc]
mov dword [eax], 0xf
jmp 0x10030697
mov edi, dword [ebp - 0x10]
mov al, byte [ebp - 7]
mov byte [edi], al
add dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x100306d2
mov ecx, dword [ebp - 0x40]
mov dword [eax], ecx
add dword [ebp - 0x14], 4
mov dword [ebp - 0x1c], 1
jmp 0x100305f8
mov edi, dword [ebp - 0x24]
mov cl, byte [ebp - 8]
mov byte [edi + 0x4c], cl
cmp al, 2
jne 0x100306c6
mov cl, byte [ebp - 7]
mov byte [edi + 0x4d], cl
mov byte [edi + 0x3f], al
mov eax, dword [ebp + 0xc]
mov dword [eax], 0xf
mov dword [ebp - 0x1c], 1
jmp 0x100305f8