Function at 0x4878f0
Capabilities:
Get common file path
Identify system language via api
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
mov eax, 0x4358
call fcn.004cb9f0
xor edx, edx
mov eax, dword [0x52ec00]
xor eax, ebp
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x432c]
mov ecx, dword [ebp + 0x1c]
push eax
push 1
push 0x1001
mov dword [eax - 4], edx
mov dword [ebp - 0x15], 0x5c3f5c5c
mov byte [ebp - 0x11], dl
mov dword [ecx], edx
call fcn.00480eb0
add esp, 0xc
test eax, eax
je 0x487958
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
lea eax, [ebp - 0x4334]
push eax
push 1
push 0x1001
call fcn.00480eb0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4879a4
push dword [ebp - 0x432c]
call fcn.00480f70
add esp, 4
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
lea eax, [ebp - 0x4338]
push eax
push 1
push 0x1001
call fcn.00480eb0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x487e01
mov eax, dword [ebp + 0xc]
cmp dword [eax], 3
je 0x48868b
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x124]
cmp ecx, 0xfffffffc
je 0x488681
cmp ecx, 0xfffffffd
je 0x487a04
cmp ecx, 0xfffffffe
jne 0x4879f3
mov edx, str.FOR_TYPE
jmp 0x487a09
cmp ecx, 0xffffffff
mov edx, str.FOR_PRINT
je 0x487a09
mov edx, 0
jmp 0x487a09
mov edx, str.FOR_ACCEPT
mov eax, dword [ebp + 8]
test byte [eax + 0x1a9], 4
je 0x487a25
mov eax, dword [ebp + 8]
test byte [eax + 0x1a0], 1
je 0x487b01
test edx, edx
je 0x487b01
push 0x1001
push dword [ebp - 0x4334]
push edx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea edx, [eax - 1]
cmp edx, 0xfff
ja 0x487a6a
mov ecx, dword [ebp - 0x4334]
xor edx, edx
mov dword [ebp - 0x433c], ecx
mov ebx, 1
mov dword [ebp - 0x4330], eax
xor esi, esi
jmp 0x487b81
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x124]
add eax, 4
cmp eax, 0xa
ja 0x487a89
movzx eax, byte [eax + 0x505ef8]
add eax, 0x487a89
jmp eax
xor ecx, ecx
jmp 0x487ad3
mov dword [ebp - 0x433c], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x487af0
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x487adb
dec eax
xor edx, edx
xor esi, esi
mov dword [ebp - 0x4330], eax
xor ebx, ebx
jmp 0x487b81
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
test eax, eax
je 0x488495
mov edx, dword [ebp + 0xc]
cmp byte [eax], 0x20
mov esi, dword [edx + 8]
jne 0x487b25
test esi, esi
jle 0x487b3b
inc eax
dec esi
cmp byte [eax], 0x20
je 0x487b1a
test esi, esi
jle 0x487b3b
movsx ecx, byte [esi + eax - 1]
test ecx, 0xffffffdf
jne 0x487b3b
dec esi
test esi, esi
jg 0x487b29
cmp esi, 0x1000
mov ecx, esi
jle 0x487b4a
mov ecx, 0x1000
push ecx
push eax
push dword [ebp - 0x4338]
mov dword [ebp - 0x4330], ecx
call fcn.004c6aa0
add esp, 0xc
mov eax, dword [ebp - 0x4330]
mov ebx, 1
mov ecx, dword [ebp - 0x4338]
mov byte [eax + ecx], 0
mov ecx, dword [ebp - 0x4338]
mov dword [ebp - 0x433c], ecx
cmp byte [ecx], 0x20
jne 0x487bac
test eax, eax
jle 0x487bc8
inc ecx
dec eax
cmp byte [ecx], 0x20
jne 0x487ba0
test eax, eax
jle 0x48847e
inc ecx
dec eax
cmp byte [ecx], 0x20
je 0x487b91
mov dword [ebp - 0x433c], ecx
mov dword [ebp - 0x4330], eax
test eax, eax
jle 0x487bc8
movsx edi, byte [eax + ecx - 1]
test edi, 0xffffffdf
jne 0x487bf4
dec eax
mov dword [ebp - 0x4330], eax
test eax, eax
jg 0x487bb0
jne 0x487bf4
mov eax, dword [ebp + 8]
test byte [eax + 0x1a9], 4
je 0x487bf4
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x433c]
lea ecx, [ebp - 0x4330]
call fcn.004886f0
mov edi, eax
test edi, edi
jne 0x487dbf
cmp dword [ebp + 0x18], 0
jne 0x487c26
push 4
mov edi, dword [ebp - 0x433c]
lea eax, [ebp - 0x15]
push eax
push edi
call fcn.004d7be0
add esp, 0xc
test eax, eax
jne 0x487c1e
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
jmp 0x487c26
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x487c7f
cmp esi, 0x1000
jg 0x487c36
mov edi, dword [ebp - 0x433c]
jmp 0x487c7f
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x311
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
test ebx, ebx
jne 0x487c8a
xor ecx, ecx
jmp 0x487d29
mov eax, dword [ebp - 0x4330]
push edi
push dword [ebp + 8]
mov byte [edi + eax], 0
call fcn.004501b0
add esp, 8
cmp eax, 0xffffffff
je 0x487e57
cmp eax, 1
je 0x487cbc
cmp eax, 0xfffffffa
jne 0x487cd9
cmp dword [0x22072dc], 0
jne 0x487cd9
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [ebp + 8]
xor ecx, ecx
mov edi, dword [ebp - 0x433c]
xor ebx, ebx
mov dword [esi + 0x104], eax
jmp 0x487d29
test eax, eax
jne 0x487cfa
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [ebp + 8]
xor ecx, ecx
mov edi, dword [ebp - 0x433c]
xor ebx, ebx
mov dword [esi + 0x104], eax
jmp 0x487d29
cmp eax, 2
jne 0x487d1c
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [ebp + 8]
xor ecx, ecx
mov edi, dword [ebp - 0x433c]
xor ebx, ebx
mov dword [esi + 0x104], eax
jmp 0x487d29
mov edi, dword [ebp - 0x433c]
xor ebx, ebx
mov ecx, 1
mov esi, dword [ebp + 0x10]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x487d2c
cmp dword [0x22072dc], 0
je 0x487d55
test ebx, ebx
jne 0x487d65
mov eax, dword [ebp + 8]
cmp dword [eax + 0x104], 0xffffffff
je 0x487e3d
jmp 0x487d65
test ebx, ebx
jne 0x487d65
mov eax, dword [ebp + 8]
cmp dword [eax + 0x104], 0xffffffff
je 0x487d70
test ecx, ecx
jne 0x487d70
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
jmp 0x487d79
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4334]
call fcn.00480f70
add esp, 8
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call fcn.004cba1b
test ecx, ecx
jne 0x487d70
mov eax, dword [ebp + 8]
mov dword [eax + 0x104], 0
jmp 0x487d69
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
jne 0x488471
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
test byte [eax + 0x1a9], 8
mov edi, dword [edi + 0xc]
jne 0x487e7f
test edi, edi
je 0x48811c
jmp 0x487e87
test edi, edi
je 0x488459
mov eax, dword [ebp + 0xc]
cmp byte [edi], 0x20
mov esi, dword [eax + 0x10]
jne 0x487e9d
test esi, esi
jle 0x487eb6
inc edi
dec esi
cmp byte [edi], 0x20
je 0x487e92
test esi, esi
jle 0x487eb6
movsx eax, byte [esi + edi - 1]
test eax, 0xffffffdf
jne 0x48844a
dec esi
test esi, esi
jg 0x487ea1
cmp dword [ebp + 0x18], 0
jne 0x487f82
push 4
lea eax, [ebp - 0x15]
push eax
push edi
call fcn.004d7be0
add esp, 0xc
test eax, eax
jne 0x487f31
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
cmp esi, 0x1000
jl 0x487f82
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x311
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
cmp esi, 0x104
jl 0x487f82
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x302
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push esi
push edi
push dword [ebp - 0x432c]
call fcn.004c6aa0
add esp, 0xc
mov eax, dword [ebp - 0x432c]
mov byte [esi + eax], 0
mov edx, dword [ebp - 0x432c]
test edx, edx
je 0x488439
cmp byte [edx], 0x20
jne 0x487fba
test esi, esi
jle 0x487fcf
inc edx
dec esi
cmp byte [edx], 0x20
je 0x487faf
test esi, esi
jle 0x487fcf
movsx eax, byte [esi + edx - 1]
test eax, 0xffffffdf
jne 0x487fcf
dec esi
test esi, esi
jg 0x487fbe
mov eax, dword [ebp + 0xc]
cmp dword [eax], 3
je 0x4882cc
test edx, edx
je 0x487ffe
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x487fef
cmp byte [edx + esi], 0x5c
je 0x488009
jmp 0x487ffe
movsx eax, byte [edx + esi - 1]
cmp eax, 0x2f
je 0x488009
cmp eax, 0x5c
je 0x488009
test esi, esi
jle 0x488009
mov edi, 1
jmp 0x48800d
xor eax, eax
xor edi, edi
cmp dword [ebp + 0x18], 0
jne 0x48801b
mov ecx, dword [ebp + 0x1c]
cmp dword [ecx], 0
je 0x48807a
mov ecx, esi
add ecx, dword [ebp - 0x4330]
add ecx, edi
cmp ecx, 0x1000
jle 0x4880d5
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x311
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov ecx, esi
add ecx, dword [ebp - 0x4330]
add ecx, edi
cmp ecx, 0x104
jle 0x4880d5
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x302
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
push esi
push edx
mov edx, dword [ebp + 0x10]
push edx
call fcn.004c6aa0
add esp, 0xc
mov edx, dword [ebp + 0x10]
add edx, esi
test edi, edi
je 0x4880ef
mov byte [edx], 0x5c
push dword [ebp - 0x4330]
push dword [ebp - 0x433c]
add edx, edi
push edx
call fcn.004c6aa0
add esp, 0xc
mov ecx, dword [ebp - 0x4330]
add esi, edi
mov edx, dword [ebp + 0x10]
add ecx, edx
mov byte [esi + ecx], 0
jmp 0x487d69
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
cmp eax, 0x411
jne 0x488220
push 0x1001
lea edi, [ebp - 0x4328]
push edi
push 0xffffffffffffffff
push dword [ebp - 0x433c]
push 1
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
lea esi, [ebp - 0x2326]
push esi
push 0x1001
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov dword [ebp - 0x434c], eax
cmp dword [ebp - 0x434c], 0x2002
jae 0x4881fb
cmp dword [ebp - 0x434c], 0
je 0x488295
cmp dword [ebp - 0x434c], 0x1001
jae 0x488295
xor eax, eax
push eax
push eax
push 0x1000
push dword [ebp - 0x432c]
push 0xffffffffffffffff
push esi
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [ebp - 0x4330]
neg ecx
add ecx, dword [ebp - 0x434c]
dec ecx
test ecx, ecx
jle 0x488295
mov edx, dword [ebp - 0x432c]
xor eax, eax
movzx esi, byte [eax + edx]
test esi, 0x80
jne 0x488295
inc eax
cmp eax, ecx
jl 0x4881cf
mov eax, dword [ebp - 0x434c]
mov dword [ebp - 0x433c], edx
mov dword [ebp - 0x4330], eax
jmp 0x488295
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x311
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx eax, ax
cmp eax, 0x411
je 0x488130
push 0
push dword [ebp - 0x432c]
push 0x1001
push dword [ebp - 0x433c]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov dword [ebp - 0x434c], eax
cmp dword [ebp - 0x434c], 0x1000
ja 0x4882a7
cmp dword [ebp - 0x434c], 0
je 0x488295
push dword [ebp - 0x434c]
push 0x3f
mov esi, dword [ebp - 0x432c]
push esi
call fcn.004ce190
add esp, 0xc
test eax, eax
jne 0x488295
mov eax, dword [ebp - 0x434c]
mov dword [ebp - 0x433c], esi
mov dword [ebp - 0x4330], eax
mov eax, dword [ebp + 0xc]
xor edx, edx
xor esi, esi
cmp dword [eax], 3
jne 0x488009
jmp 0x4882cc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x311
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, dword [ebp + 8]
test byte [eax + 0x1a1], 0x20
jne 0x487fdb
push 0x105
mov dword [ebp - 0x434c], edx
lea esi, [ebp - 0x11a]
push esi
push str.FORT_TMPDIR
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edx, dword [ebp - 0x434c]
mov ecx, eax
test ecx, ecx
ja 0x488427
mov byte [ebp - 0x11a], 0
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0xc], 0
je 0x4883bf
push 0x105
push 0
mov dword [ebp - 0x434c], edx
lea edi, [ebp - 0x21f]
push edi
call fcn.004c6960
mov edx, dword [ebp - 0x434c]
add esp, 0xc
push edi
push 0
push 0x5060dc
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x488376
mov eax, dword [ebp + 8]
test byte [eax + 0x1a9], 8
je 0x488364
lea edi, [ebp - 0x21d]
mov esi, dword [ebp + 0x10]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x488367
jmp 0x487d69
push dword [ebp - 0x4334]
call fcn.00480f70
push dword [ebp - 0x432c]
call fcn.00480f70
push dword [ebp - 0x4338]
call fcn.00480f70
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], 0
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x487e38
mov eax, 0x2b
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov eax, dword [ebp + 8]
test byte [eax + 0x1a9], 8
je 0x4883e1
mov byte [ebp - 0x324], 0x2e
lea edx, [ebp - 0x324]
mov byte [edx + 1], 0
jmp 0x48831d
test ecx, ecx
je 0x488401
push 0x104
push esi
lea esi, [ebp - 0x324]
push esi
call fcn.0047cf20
add esp, 0xc
mov edx, esi
jmp 0x48831d
lea esi, [ebp - 0x324]
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
mov edx, esi
jne 0x48831d
mov edx, 0
jmp 0x48831d
cmp ecx, 0x105
jae 0x488309
inc ecx
jmp 0x488310
mov eax, dword [ebp + 0xc]
cmp dword [eax], 3
jne 0x487ffe
jmp 0x4882cc
cmp dword [ebp + 0x18], 0
je 0x487ec0
jmp 0x487edc
mov eax, dword [ebp + 0xc]
cmp dword [eax], 3
jne 0x488471
mov eax, dword [ebp + 8]
test byte [eax + 0x1a1], 0x20
je 0x48811c
mov edi, dword [ebp - 0x433c]
xor ecx, ecx
jmp 0x487d29
mov dword [ebp - 0x433c], ecx
mov dword [ebp - 0x4330], eax
je 0x487bca
jmp 0x487bf4
mov dword [ebp - 0x4348], str.FORT_d
mov dword [ebp - 0x4344], ecx
call fcn.0044f1b0
mov edx, eax
lea eax, [ebp - 0x4344]
push eax
push 0
push str.FORT_d
push 0xffffffffffffffff
push dword [ebp - 0x4338]
push dword [edx + 4]
mov ecx, dword [edx]
or ecx, 1
push ecx
call fcn.004d7b10
add esp, 0x1c
push 0x1001
mov ebx, dword [ebp - 0x4334]
push ebx
push dword [ebp - 0x4338]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
ja 0x488670
test ebx, ebx
je 0x4884fa
mov byte [ebx], 0
test eax, eax
je 0x48851f
mov ecx, dword [ebp - 0x4334]
xor edx, edx
dec eax
mov ebx, 1
mov dword [ebp - 0x433c], ecx
xor esi, esi
mov dword [ebp - 0x4330], eax
jmp 0x487b81
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x124]
add eax, 4
cmp eax, 0xa
ja 0x48853e
movzx eax, byte [eax + 0x505f04]
add eax, 0x48853e
jmp eax
xor ecx, ecx
mov eax, dword [ebp + 8]
test byte [eax + 0x1a9], 4
jne 0x4885d8
mov eax, dword [ebp + 8]
test byte [eax + 0x1a1], 0x20
je 0x48857b
mov ecx, dword [ebp + 8]
mov ebx, 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [ecx + 0x78]
mov dword [ebp - 0x433c], ecx
mov dword [eax], 0
jmp 0x48864a
mov eax, dword [ebp + 8]
mov ebx, str.fort._d
mov dword [ebp - 0x433c], ecx
mov dword [ebp - 0x4358], ebx
mov edx, dword [eax + 0x124]
mov dword [ebp - 0x4354], edx
call fcn.0044f1b0
mov edx, eax
lea eax, [ebp - 0x4354]
push eax
push 0
push ebx
push 0xffffffffffffffff
push dword [ebp - 0x4338]
push dword [edx + 4]
mov ecx, dword [edx]
or ecx, 1
push ecx
call fcn.004d7b10
add esp, 0x1c
mov ecx, dword [ebp - 0x4338]
mov ebx, 1
mov dword [ebp - 0x433c], ecx
jmp 0x48864a
mov eax, dword [ebp - 0x4338]
mov ebx, 1
mov byte [eax], 0
mov ecx, dword [ebp - 0x4338]
mov dword [ebp - 0x433c], ecx
jmp 0x48864a
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x488661
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x48864c
dec eax
xor edx, edx
mov dword [ebp - 0x4330], eax
xor esi, esi
jmp 0x487b81
cmp eax, 0x1001
jae 0x4884f3
inc eax
jmp 0x4884fa
mov edx, str.FOR_READ
jmp 0x487a09
mov eax, dword [ebp + 8]
test byte [eax + 0x1a1], 0x20
jne 0x4879d0
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
je 0x4886b3
push 0
push 0x212
call fcn.0047e600
add esp, 8
push 0x1000
push str.SCRATCH
push dword [ebp - 0x4338]
call fcn.0047cf20
add esp, 0xc
mov edi, dword [ebp - 0x4338]
mov eax, 7
mov dword [ebp - 0x433c], edi
mov ebx, 1
mov dword [ebp - 0x4330], 7
jmp 0x487c90