Function at 0x440c20
Capabilities:
Get common file path
Get file size
Read file on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, 1
push ebx
sub esp, 0x3c
mov ebx, 0x4463d0
mov dword [esp + 4], esi
mov dword [esp], 0x208
call fcn.00403a80
mov dword [ebp - 0x20], eax
mov dword [esp + 4], ebx
mov dword [esp], 0x208
call sub.KERNEL32.dll_GetCurrentDirectoryA
mov eax, dword [ebp - 0x20]
sub esp, 8
mov ecx, 0x208
mov dword [esp + 8], ecx
mov dword [esp], 0
mov dword [esp + 4], eax
call sub.KERNEL32.dll_GetModuleFileNameA
sub esp, 0xc
test eax, eax
je 0x440fbc
mov eax, dword [ebp - 0x20]
mov edx, 0x5c
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_strrchr
mov dword [ebp - 0x18], eax
test eax, eax
je 0x440c9e
mov byte [eax], 0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
mov dword [esp], 0x446810
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov ecx, 0x446810
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x440cd0
test edx, 0x8080
jne 0x440cf5
shr edx, 0x10
add ecx, 2
add dl, dl
mov eax, 0x7365735c
sbb ecx, 3
sub ecx, 0x446810
mov dword [ecx + 0x446810], eax
mov eax, 0x6e6f6973
mov dword [ecx + 0x446814], eax
mov eax, 0x73
mov word [ecx + 0x446818], ax
mov eax, dword [ebp - 0x20]
mov dword [esp], 0x4465f0
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov ecx, 0x4465f0
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x440d40
test edx, 0x8080
jne 0x440d65
shr edx, 0x10
add ecx, 2
add dl, dl
mov eax, 0x6873735c
sbb ecx, 3
sub ecx, 0x4465f0
mov dword [ecx + 0x4465f0], eax
mov eax, 0x74736f68
mov dword [ecx + 0x4465f4], eax
mov eax, 0x7379656b
mov dword [ecx + 0x4465f8], eax
mov byte [ecx + 0x4465fc], 0
mov eax, dword [ebp - 0x20]
mov dword [esp], 0x446a30
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov ecx, 0x446a30
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x440db0
test edx, 0x8080
jne 0x440dd5
shr edx, 0x10
add ecx, 2
add dl, dl
mov eax, pe_nt_image_headers32
mov edi, 0x7475705c
sbb ecx, 3
mov esi, 0x722e7974
sub ecx, 0x446a30
mov dword [ecx + 0x446a30], edi
mov ebx, 0x646e
xor edx, edx
mov dword [ecx + 0x446a34], esi
mov word [ecx + 0x446a38], bx
mov byte [ecx + 0x446a3a], 0
mov dword [esp + 0x14], eax
mov eax, 3
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 8], eax
mov eax, 0x80000000
mov dword [esp + 0x18], edx
mov dword [esp + 4], eax
mov dword [esp], str.putty.conf
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x1c], eax
sub esp, 0x1c
mov dword [esp], 0x4463d0
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
cmp dword [ebp - 0x1c], 0xffffffff
je 0x440fa4
xor eax, eax
mov edi, 1
xor esi, esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileSize
sub esp, 8
mov ebx, eax
lea eax, [eax + 0x10]
mov dword [esp + 4], edi
mov dword [esp], eax
call fcn.00403a80
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x10], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
test eax, eax
je 0x44128a
mov eax, dword [ebp - 0x14]
mov byte [ebx + eax], 0
cmp dword [ebp - 0x14], 0
mov dword [ebp - 0x18], eax
je 0x440f8b
lea esi, [esi]
lea edi, [edi]
mov eax, dword [ebp - 0x18]
cmp byte [eax], 0x3b
je 0x44105c
mov eax, 0x3d
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
test eax, eax
mov ebx, eax
je 0x440f8b
mov byte [eax], 0
mov edi, str.sessions
mov ecx, 9
cld
mov esi, dword [ebp - 0x18]
inc ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x44107b
cld
mov esi, dword [ebp - 0x18]
mov edi, str.sshhostkeys
mov ecx, 0xc
repe cmpsb byte [esi], byte es:[edi]
je 0x44112a
cld
mov esi, dword [ebp - 0x18]
mov edi, str.seedfile
mov ecx, 9
repe cmpsb byte [esi], byte es:[edi]
je 0x4411da
cld
mov esi, dword [ebp - 0x18]
mov edi, str.sessionsuffix
mov ecx, 0xe
repe cmpsb byte [esi], byte es:[edi]
je 0x4412ba
cld
mov esi, dword [ebp - 0x18]
mov edi, str.keysuffix
mov ecx, 0xa
repe cmpsb byte [esi], byte es:[edi]
je 0x440fd7
inc dword [ebp - 0x18]
nop
lea esi, [esi]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x440ee0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
sub esp, 4
mov dword [esp], eax
call fcn.00403f40
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.00403f40
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x208
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
call sub.KERNEL32.dll_GetCurrentDirectoryA
sub esp, 8
jmp 0x440cac
mov dword [esp], ebx
mov eax, 0xa
mov dword [esp + 4], eax
call sub.msvcrt.dll_strchr
mov dword [ebp - 0x18], eax
mov byte [eax], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x4463b0
call sub.msvcrt.dll_strcpy
mov dword [esp], 0x4463b0
call sub.msvcrt.dll_strlen
movzx ecx, byte [eax + 0x4463af]
lea ebx, [eax + 0x4463af]
cmp cl, 0x20
sete dl
cmp cl, 0xa
sete al
jmp 0x441035
dec ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
jne 0x441025
cmp cl, 0xd
je 0x441025
cmp cl, 9
je 0x441025
lea esi, [esi]
lea edi, [edi]
mov byte [ebx + 1], 0
inc dword [ebp - 0x18]
jmp 0x440f80
mov dword [esp], eax
mov edx, 0xa
mov dword [esp + 4], edx
call sub.msvcrt.dll_strchr
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jmp 0x440f85
mov dword [esp], ebx
mov edi, 0xa
mov dword [esp + 4], edi
call sub.msvcrt.dll_strchr
mov dword [ebp - 0x18], eax
mov byte [eax], 0
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], ebx
mov dword [esp], 0x446810
mov dword [esp + 4], eax
call fcn.00440b10
mov ecx, 0x446810
nop
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x4410b0
test edx, 0x8080
jne 0x4410d5
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, 0x446810
lea ebx, [ecx + 0x44680f]
movzx ecx, byte [ecx + 0x44680f]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
je 0x441116
nop
dec ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
jne 0x441100
cmp cl, 0xd
je 0x441100
cmp cl, 9
jne 0x441050
dec ebx
movzx ecx, byte [ebx]
jmp 0x441104
mov dword [esp], ebx
mov esi, 0xa
mov dword [esp + 4], esi
call sub.msvcrt.dll_strchr
mov dword [ebp - 0x18], eax
mov byte [eax], 0
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], ebx
mov dword [esp], 0x4465f0
mov dword [esp + 4], eax
call fcn.00440b10
mov ecx, 0x4465f0
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x441160
test edx, 0x8080
jne 0x441185
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, 0x4465f0
lea ebx, [ecx + 0x4465ef]
movzx ecx, byte [ecx + 0x4465ef]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
je 0x4411c6
nop
dec ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
jne 0x4411b0
cmp cl, 0xd
je 0x4411b0
cmp cl, 9
jne 0x441050
dec ebx
movzx ecx, byte [ebx]
jmp 0x4411b4
mov dword [esp], ebx
mov ecx, 0xa
mov dword [esp + 4], ecx
call sub.msvcrt.dll_strchr
mov dword [ebp - 0x18], eax
mov byte [eax], 0
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], ebx
mov dword [esp], 0x446a30
mov dword [esp + 4], eax
call fcn.00440b10
mov ecx, 0x446a30
lea esi, [esi]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
not eax
and edx, eax
and edx, 0x80808080
je 0x441210
test edx, 0x8080
jne 0x441235
shr edx, 0x10
add ecx, 2
add dl, dl
sbb ecx, 3
sub ecx, 0x446a30
lea ebx, [ecx + 0x446a2f]
movzx ecx, byte [ecx + 0x446a2f]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
je 0x441276
nop
dec ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
jne 0x441260
cmp cl, 0xd
je 0x441260
cmp cl, 9
jne 0x441050
dec ebx
movzx ecx, byte [ebx]
jmp 0x441264
mov dword [esp], 0x456540
xor ecx, ecx
mov dword [esp + 4], ecx
call fcn.00440770
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x14]
sub esp, 4
mov dword [esp], eax
call fcn.00403f40
jmp 0x440fa4
mov dword [esp], ebx
mov edx, 0xa
mov dword [esp + 4], edx
call sub.msvcrt.dll_strchr
mov dword [ebp - 0x18], eax
mov byte [eax], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x4467f8
call sub.msvcrt.dll_strcpy
mov dword [esp], 0x4467f8
call sub.msvcrt.dll_strlen
movzx ecx, byte [eax + 0x4467f7]
lea ebx, [eax + 0x4467f7]
cmp cl, 0x20
sete dl
cmp cl, 0xa
sete al
jmp 0x441318
dec ebx
movzx ecx, byte [ebx]
cmp cl, 0x20
sete al
cmp cl, 0xa
sete dl
or eax, edx
test al, 1
jne 0x441308
cmp cl, 0xd
je 0x441308
cmp cl, 9
je 0x441308
mov byte [ebx + 1], 0
jmp 0x441054