Function at 0x5b7a00
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1bc
mov eax, dword [0xa4b19c]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
lea ecx, [eax - 1]
mov eax, dword [0x636d20]
cmp eax, ecx
push edi
jg 0x5b7ac3
mov edx, dword [0xa4b1a0]
or ecx, 0xffffffff
mov edi, dword [edx + eax*4]
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [ebp + 0x10]
not ecx
dec ecx
mov dword [eax], ecx
mov edx, dword [0x636d20]
mov esi, dword [0xa4b1a0]
mov edi, dword [ebx]
mov esi, dword [esi + edx*4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [eax]
mov ecx, dword [ebx]
mov byte [eax + ecx], 0
mov eax, dword [0x636d20]
inc eax
push eax
push 0x636d20
mov dword [0x636d20], eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov eax, dword [ebx]
cmp byte [eax], 0x20
jne 0x5b7a9a
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0
jle 0x5b7a9a
inc eax
mov dword [ebx], eax
mov eax, edx
mov edx, dword [eax]
dec edx
mov dword [eax], edx
mov eax, dword [ebx]
cmp byte [eax], 0x20
je 0x5b7a81
mov edx, dword [ebp + 0x10]
cmp dword [edx], 0
jle 0x5b7abd
mov eax, dword [edx]
mov ecx, dword [ebx]
mov cl, byte [ecx + eax - 1]
cmp cl, 0x20
je 0x5b7ab3
test cl, cl
jne 0x5b7aba
dec eax
test eax, eax
mov dword [edx], eax
jg 0x5b7aa2
cmp dword [edx], 0
jne 0x5b82e2
mov eax, dword [0x7083c0]
test eax, eax
je 0x5b7b6c
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x13c]
mov eax, dword [edx + 0xb8]
push eax
push str.Open:_Select_File_for_Unit
push str._s_d
push ecx
call fcn.005bfd29
add esp, 0x10
mov eax, dword [ebx]
lea edx, [ebp - 0x13c]
push edx
push 0x100
push eax
call fcn.005bf460
mov esi, eax
add esp, 0xc
test esi, esi
je 0x5b7b1e
mov edi, dword [ebx]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x5b7b50
push 0x2134
push str.File_Open_Error
push str.A_File_Must_be_Selected_r_rTerminate_Program_
xor esi, esi
call fcn.005bf460
add esp, 0xc
cmp eax, 6
jne 0x5b7b50
push 1
call fcn.005bf460
add esp, 4
push 1
call fcn.005c2233
add esp, 4
test esi, esi
je 0x5b7af3
mov edi, dword [ebx]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [edx], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x1bc]
mov eax, dword [ebx + 0xb8]
push eax
push str.File_name_missing_or_blank___please_enter_file_name_r_nUNIT__d_
push ecx
call fcn.005bfd29
lea edi, [ebp - 0x1bc]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [ebx + 0xb8]
mov edi, 6
not ecx
dec ecx
cmp eax, edi
mov dword [ebp + 8], ecx
je 0x5b7bca
lea edx, [ebp - 0xcc]
push 2
lea eax, [ebp - 0xc]
push edx
push eax
push edi
call fcn.005a7870
add esp, 0x10
test eax, eax
jne 0x5b82e4
cmp dword [ebx + 0xb8], 5
je 0x5b7c04
lea ecx, [ebp - 0xec]
push 7
lea edx, [ebp - 0x10]
push ecx
push edx
push 5
call fcn.005a7870
mov esi, eax
add esp, 0x10
test esi, esi
je 0x5b7c04
cmp dword [ebx + 0xb8], edi
je 0x5b8408
mov eax, dword [ebp - 0xc]
jmp 0x5b8384
lea edx, [ebp - 4]
mov esi, 1
push edx
push esi
push 0x128
call fcn.005a3d00
add esp, 0xc
test eax, eax
jne 0x5b82e4
lea eax, [ebp - 8]
push eax
push esi
push 0x128
call fcn.005a3d00
add esp, 0xc
test eax, eax
jne 0x5b82e4
mov edi, dword [ebp - 4]
mov ecx, 0x4a
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
mov ecx, 0x4a
rep stosd dword es:[edi], eax
mov ecx, 0x27
lea edi, [ebp - 0xac]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp - 4]
mov dword [ecx + 0xb8], 6
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x118]
mov eax, dword [ecx + 0x118]
mov edx, eax
xor edx, edi
and edx, 0x400000
xor edx, eax
mov dword [ecx + 0x118], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x100
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x8000000
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x200000
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x10000000
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x200
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x400
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x800
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x2000
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 4]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x4000
xor edx, eax
xor eax, eax
mov dword [ecx + 0x120], edx
mov edi, dword [str.CONOUT_]
or ecx, 0xffffffff
mov dword [ebp - 0xac], esi
mov dword [ebp - 0x58], 4
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x80], edi
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 4]
not ecx
dec ecx
push eax
mov dword [ebp - 0x7c], ecx
lea ecx, [ebp - 0xac]
push ecx
call fcn.005b5190
mov edi, eax
add esp, 8
test edi, edi
je 0x5b7e51
mov edx, dword [ebp - 4]
push edx
call fcn.005a3d70
mov eax, dword [ebp - 8]
add esp, 4
push eax
call fcn.005a3d70
mov eax, dword [ebx + 0xb8]
add esp, 4
cmp eax, 6
je 0x5b7e29
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0xb8]
push edx
call fcn.005a8210
add esp, 4
cmp dword [ebx + 0xb8], 5
je 0x5b8035
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xb8]
push ecx
call fcn.005a8210
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 8]
mov esi, 5
mov dword [edx + 0xb8], esi
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x118]
mov eax, dword [ecx + 0x118]
mov edx, eax
xor edx, edi
and edx, 0x400000
xor edx, eax
mov dword [ecx + 0x118], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x100
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x8000000
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x200000
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x11c]
mov eax, dword [ecx + 0x11c]
mov edx, eax
xor edx, edi
and edx, 0x10000000
xor edx, eax
mov dword [ecx + 0x11c], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x200
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x400
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x800
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x2000
xor edx, eax
mov dword [ecx + 0x120], edx
mov ecx, dword [ebp - 8]
mov edi, dword [ebx + 0x120]
mov eax, dword [ecx + 0x120]
mov edx, eax
xor edx, edi
and edx, 0x4000
xor edx, eax
xor eax, eax
mov dword [ecx + 0x120], edx
mov edi, dword [str.CONIN_]
or ecx, 0xffffffff
mov dword [ebp - 0x80], edi
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 8]
not ecx
dec ecx
push eax
mov dword [ebp - 0x7c], ecx
lea ecx, [ebp - 0xac]
push ecx
call fcn.005b5190
mov edi, eax
add esp, 8
test edi, edi
je 0x5b803e
mov edx, dword [ebp - 4]
push 0
push edx
call fcn.005a2340
mov eax, dword [ebp - 4]
add esp, 8
push eax
call fcn.005a3d70
mov ecx, dword [ebp - 8]
add esp, 4
push ecx
call fcn.005a3d70
mov eax, dword [ebx + 0xb8]
add esp, 4
cmp eax, 6
je 0x5b801b
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0xb8]
push eax
call fcn.005a8210
add esp, 4
cmp dword [ebx + 0xb8], esi
je 0x5b8035
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xb8]
push edx
call fcn.005a8210
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov byte [eax + 0x10e], 3
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x11c]
or ecx, 4
mov dword [eax + 0x11c], ecx
mov ecx, dword [ebp + 0x10]
cmp dword [ecx], 0
jne 0x5b8277
mov esi, dword [ebp - 4]
push 0
push esi
call fcn.005acf20
add esp, 8
test eax, eax
jne 0x5b82eb
mov dl, byte [esi + 0x10c]
movsx eax, dl
dec eax
cmp eax, 6
ja case.default.0x5b808f
jmp dword [eax*4 + 0x5b8414]
mov eax, dword [esi + 0x30]
test eax, eax
je 0x5b80a5
add eax, 4
mov dword [esi + 0x2c], eax
jmp 0x5b80ae
mov edx, dword [esi + 0x28]
add edx, 4
mov dword [esi + 0x2c], edx
mov eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0x2c]
lea edx, [eax + ecx - 8]
mov dword [esi + 0x34], edx
jmp 0x5b8144
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x5b80cd
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0xb0]
mov edx, eax
mov dword [esi + 0x2c], eax
lea eax, [ecx + edx - 1]
mov dword [esi + 0x34], eax
jmp 0x5b8144
mov eax, dword [esi + 0x30]
test eax, eax
je 0x5b80ed
mov dword [esi + 0x2c], eax
jmp 0x5b80f3
mov ecx, dword [esi + 0x28]
mov dword [esi + 0x2c], ecx
mov eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0x2c]
add ecx, eax
mov eax, dword [esi + 0x11c]
test eax, 0x8000000
mov dword [esi + 0x34], ecx
je 0x5b8169
mov eax, dword [esi + 0x118]
test ah, 1
je 0x5b8144
test ah, 0x10
je 0x5b8144
cmp dl, 1
jne 0x5b8144
add ecx, 0xfffffffe
mov dword [esi + 0x34], ecx
jmp 0x5b8144
push 0x138d
push str.E:_forrtl_build_for_nt_open_proc.c
push 2
push 0xc0000008
call fcn.005a41d0
add esp, 0x10
test dword [esi + 0x11c], 0x8000000
je 0x5b8169
mov eax, dword [esi + 0x118]
test ah, 1
je 0x5b8169
test ah, 0x10
je 0x5b8169
cmp byte [esi + 0x10c], 1
je 0x5b819f
mov al, byte [esi + 0x10e]
cmp al, 2
jne 0x5b8186
mov al, byte [esi + 0x10c]
cmp al, 7
je 0x5b819f
cmp al, 6
je 0x5b819f
dec dword [esi + 0x34]
jmp 0x5b819f
cmp al, 1
jne 0x5b819f
mov al, byte [esi + 0x10c]
cmp al, 7
je 0x5b819b
cmp al, 6
je 0x5b819b
dec dword [esi + 0x34]
add dword [esi + 0x2c], 5
mov edx, dword [esi + 0x2c]
mov dword [esi + 0x3c], 0
mov dword [esi + 0x38], edx
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 4]
mov ecx, edx
lea esi, [ebp - 0x1bc]
mov edi, dword [eax + 0x2c]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x2c]
add esi, edx
mov dword [eax + 0x2c], esi
mov ecx, dword [ebp - 4]
push ecx
call fcn.005abf20
mov esi, eax
add esp, 4
test esi, esi
jne 0x5b8323
mov edx, dword [ebp - 8]
push edx
call fcn.005bea30
mov esi, eax
add esp, 4
test esi, esi
jne 0x5b839c
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov esi, dword [eax + 0x2c]
mov eax, dword [eax + 0x34]
mov edi, dword [edx]
sub eax, esi
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0xc]
mov ecx, dword [edi]
mov byte [ecx + eax], 0
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, dword [edi]
cmp byte [eax], 0x20
jne 0x5b824b
cmp dword [ecx], 0
jle 0x5b824b
inc eax
mov dword [edi], eax
mov esi, dword [ecx]
dec esi
mov dword [ecx], esi
mov eax, dword [edi]
cmp byte [eax], 0x20
je 0x5b8237
cmp dword [ecx], 0
jle 0x5b826c
mov esi, dword [ecx]
mov edx, dword [edi]
mov al, byte [edx + esi - 1]
cmp al, 0x20
je 0x5b8260
test al, al
jne 0x5b8269
lea eax, [esi - 1]
test eax, eax
mov dword [ecx], eax
jg 0x5b8250
cmp dword [ecx], 0
je 0x5b8066
mov esi, 5
mov ecx, dword [ebp - 4]
push 0
push ecx
call fcn.005a2340
mov edx, dword [ebp - 8]
add esp, 8
push 0
push edx
call fcn.005a2340
mov eax, dword [ebp - 4]
add esp, 8
push eax
call fcn.005a3d70
mov ecx, dword [ebp - 8]
add esp, 4
push ecx
call fcn.005a3d70
mov eax, dword [ebx + 0xb8]
add esp, 4
cmp eax, 6
je 0x5b82c8
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0xb8]
push eax
call fcn.005a8210
add esp, 4
cmp dword [ebx + 0xb8], esi
je 0x5b82e2
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xb8]
push edx
call fcn.005a8210
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0xc0000026
push 0xc0000026
push 1
call fcn.005a4200
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0xc000002c
push 0xc000002c
push 1
call fcn.005a4200
add esp, 0x10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
push 0
push eax
call fcn.005a2340
mov ecx, dword [ebp - 8]
add esp, 8
push 0
push ecx
call fcn.005a2340
mov edx, dword [ebp - 4]
add esp, 8
push edx
call fcn.005a3d70
mov eax, dword [ebp - 8]
add esp, 4
push eax
call fcn.005a3d70
mov eax, dword [ebx + 0xb8]
add esp, 4
cmp eax, 6
je 0x5b8374
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0xb8]
push edx
call fcn.005a8210
add esp, 4
cmp dword [ebx + 0xb8], 5
je 0x5b8408
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xb8]
push ecx
call fcn.005a8210
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push 0
push edx
call fcn.005a2340
mov eax, dword [ebp - 8]
add esp, 8
push 0
push eax
call fcn.005a2340
mov ecx, dword [ebp - 4]
add esp, 8
push ecx
call fcn.005a3d70
mov edx, dword [ebp - 8]
add esp, 4
push edx
call fcn.005a3d70
mov eax, dword [ebx + 0xb8]
add esp, 4
cmp eax, 6
je 0x5b83ed
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0xb8]
push ecx
call fcn.005a8210
add esp, 4
cmp dword [ebx + 0xb8], 5
je 0x5b8408
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0xb8]
push eax
call fcn.005a8210
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret