Function at 0x458240
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x10]
push ebx
xor ebx, ebx
push ebp
push esi
cmp edx, ebx
push edi
mov dword [esp + 0x14], ebx
jne 0x45825f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x24]
cmp eax, 6
ja case.0x458270.4
mov edi, dword [esp + 0x1c]
jmp dword [eax*4 + 0x458738]
mov edi, dword [esp + 0x1c]
mov eax, edx
cmp edx, ebx
mov dword [esp + 0x10], eax
mov ebp, 0x10000
jle 0x458394
jmp 0x458294
mov eax, dword [esp + 0x10]
test ebp, ebp
jle 0x458394
mov esi, dword [edi + 0xc9c8]
cmp eax, 0x10000
mov ebx, esi
jle 0x4582b0
mov eax, 0x10000
push eax
push esi
push edi
call fcn.00457a70
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x4586bd
mov eax, dword [edi + 0xc9c8]
mov edx, dword [esp + 0x10]
sub edx, ebp
mov byte [eax + ebp], 0
mov al, byte [esi]
test al, al
mov dword [esp + 0x10], edx
je 0x4582f8
cmp al, 0xd
jne 0x4582eb
mov al, byte [esi + 1]
inc esi
cmp al, 0xd
je 0x4582e3
mov cl, byte [esi]
mov byte [ebx], cl
mov al, byte [esi + 1]
inc ebx
inc esi
test al, al
jne 0x4582df
mov eax, dword [esp + 0x24]
mov byte [ebx], 0
cmp eax, 5
jne 0x458342
mov eax, dword [edi + 0x8d4]
mov ecx, dword [eax + 0x14]
test ecx, ecx
jne 0x458324
test byte [eax + 0x1c], 0x40
je 0x458334
mov edx, dword [eax + 0x10]
cmp edx, 0x19
jl 0x458334
cmp edx, 0x1a
jg 0x458334
cmp ecx, 6
je 0x458334
cmp ecx, 0xb
jne 0x458342
cmp dword [eax + 0x10], 0x32
jne 0x458342
mov eax, dword [edi + 0xc9c8]
push eax
push eax
call dword [sym.imp.USER32.dll_OemToCharA]
mov eax, dword [edi + 0xcb28]
test eax, eax
je 0x45835c
mov eax, dword [eax + 4]
test eax, eax
je 0x45835c
mov edx, dword [edi + 0xc9c8]
push edx
call eax
mov eax, dword [edi + 0xc9c8]
mov ecx, dword [esp + 0x20]
push eax
push ecx
push 0x495270
push edi
call fcn.004561b0
push 0x493db4
push 2
push 0x495270
push edi
call fcn.004561b0
mov eax, dword [esp + 0x30]
add esp, 0x20
test eax, eax
jg 0x458290
push 0x40
lea edx, [edi + 0x8d8]
push 0
push edx
push edi
call dword [edi + 0xcb14]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
cmp edx, 0x104
mov dword [esp + 0x1c], ebx
jb 0x4583e0
add edx, 0xfffffefd
mov dword [esp + 0x20], 0x103
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x14], 1
lea esi, [edi + 0xc9dc]
push edx
push esi
push edi
call fcn.00457a70
add esp, 0xc
test eax, eax
jne 0x458402
pop edi
pop esi
pop ebp
mov eax, 0x33
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x20]
mov byte [edi + eax + 0xc9dc], 0
mov eax, dword [edi + 0x8d4]
mov ecx, dword [eax + 0x14]
test ecx, ecx
jne 0x458435
cmp dword [esp + 0x24], 6
je 0x458428
test byte [eax + 0x1c], 0x40
je 0x458445
mov edx, dword [eax + 0x10]
cmp edx, 0x19
jl 0x458445
cmp edx, 0x1a
jg 0x458445
cmp ecx, 6
je 0x458445
cmp ecx, 0xb
jne 0x45844d
cmp dword [eax + 0x10], 0x32
jne 0x45844d
push esi
push esi
call dword [sym.imp.USER32.dll_OemToCharA]
mov ecx, dword [edi + 0x8d4]
test byte [ecx + 0x1c], 0x10
je 0x4584e8
mov ebp, esi
mov dword [esp + 0x24], esi
mov bl, byte [ebp]
test bl, bl
je 0x4584e1
mov edx, dword [0x4956fc]
push edx
push ebp
call fcn.00464018
add esp, 8
cmp eax, 1
jbe 0x458497
mov ecx, eax
dec eax
test ecx, ecx
je 0x4584da
inc eax
mov dl, byte [ebp]
mov byte [esi], dl
inc esi
inc ebp
dec eax
jne 0x458487
mov dword [esp + 0x24], esi
jmp 0x4584da
cmp dword [0x4956fc], 1
movsx esi, bl
jle 0x4584b0
push 1
push esi
call fcn.00463a9a
add esp, 8
jmp 0x4584bb
mov eax, dword [0x4954f0]
mov al, byte [eax + esi*2]
and eax, 1
test eax, eax
je 0x4584ca
push esi
call fcn.00463ede
add esp, 4
jmp 0x4584cc
mov eax, esi
mov ecx, dword [esp + 0x24]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x24], ecx
inc ebp
mov esi, ecx
mov bl, byte [ebp]
test bl, bl
jne 0x45846a
mov ebx, dword [esp + 0x1c]
mov byte [esi], 0
mov ecx, dword [edi + 0x8d4]
test byte [ecx + 0x1c], 0x20
je 0x45851f
cmp dword [esp + 0x20], 8
jbe 0x45851f
mov cl, byte [edi + 0xc9e4]
lea eax, [edi + 0xc9e4]
cmp cl, 0x2e
jne 0x45851f
mov dl, byte [eax]
inc eax
test dl, dl
je 0x45851f
mov cl, byte [eax]
mov byte [eax - 1], cl
mov dl, cl
inc eax
test dl, dl
jne 0x458513
test bx, bx
je case.0x458270.4
and ebx, 0xffff
mov dword [esp + 0x20], ebx
mov edx, ebx
mov ecx, dword [edi + 0xc8e4]
mov ebx, dword [edi + 0xc8e0]
mov ebp, dword [edi + 0xc90c]
mov eax, ecx
sub eax, ebx
add eax, ebp
add eax, edx
mov esi, eax
and esi, 0x80001fff
jns 0x458560
dec esi
or esi, 0xffffe000
inc esi
mov edx, eax
sub edx, esi
test eax, eax
jge 0x458575
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 8
ret
cmp edx, ebp
je 0x4585e2
mov eax, dword [edi + 0xc904]
push 0
push edx
push eax
call fcn.0046d36a
mov ecx, dword [edi + 0xc8e0]
mov edx, dword [edi + 0xc904]
push 0x2000
push ecx
push edx
mov dword [edi + 0xc90c], eax
call fcn.0046d7e4
add esp, 0x18
mov dword [edi + 0xc8e8], eax
test eax, eax
jg 0x4585c0
pop edi
pop esi
pop ebp
mov eax, 0x33
pop ebx
add esp, 8
ret
mov ecx, dword [edi + 0xc8e0]
add ecx, esi
sub eax, esi
mov dword [edi + 0xc8e4], ecx
mov dword [edi + 0xc8e8], eax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [edi + 0xc8e8]
sub ecx, ebx
sub ecx, esi
add eax, ecx
add ebx, esi
mov dword [edi + 0xc8e8], eax
mov eax, dword [esp + 0x14]
mov dword [edi + 0xc8e4], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov esi, dword [esp + 0x1c]
mov eax, dword [esi + 0xc914]
cmp eax, ebx
je 0x458623
push eax
call fcn.00461c32
mov edx, dword [esp + 0x24]
add esp, 4
push edx
call fcn.00461d1b
add esp, 4
mov dword [esi + 0xc914], eax
test eax, eax
jne 0x458712
mov ecx, dword [esi + 0xc8e4]
mov ebx, dword [esi + 0xc8e0]
mov ebp, dword [esi + 0xc90c]
mov edx, dword [esp + 0x20]
mov eax, ecx
sub eax, ebx
add eax, ebp
add eax, edx
mov edi, eax
and edi, 0x80001fff
jns 0x45866a
dec edi
or edi, 0xffffe000
inc edi
mov edx, eax
sub edx, edi
test eax, eax
jge 0x45867f
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 8
ret
cmp edx, ebp
je 0x4586ec
push 0
push edx
mov edx, dword [esi + 0xc904]
push edx
call fcn.0046d36a
mov ecx, dword [esi + 0xc904]
mov dword [esi + 0xc90c], eax
mov eax, dword [esi + 0xc8e0]
push 0x2000
push eax
push ecx
call fcn.0046d7e4
add esp, 0x18
mov dword [esi + 0xc8e8], eax
test eax, eax
jg 0x4586ca
pop edi
pop esi
pop ebp
mov eax, 0x33
pop ebx
add esp, 8
ret
mov edx, dword [esi + 0xc8e0]
add edx, edi
sub eax, edi
mov dword [esi + 0xc8e4], edx
mov dword [esi + 0xc8e8], eax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esi + 0xc8e8]
sub ecx, ebx
sub ecx, edi
add eax, ecx
add ebx, edi
mov dword [esi + 0xc8e8], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc8e4], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ecx, dword [esp + 0x20]
push ecx
push eax
push esi
call fcn.00457a70
add esp, 0xc
test eax, eax
mov eax, 0x33
je 0x45872e
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret