Function at 0x407b50
Capabilities:
Query environment variable
Write file on windows

Disassembly:
sub esp, 0x934
mov eax, dword [0x59a024]
xor eax, esp
mov dword [esp + 0x930], eax
mov eax, dword [esp + 0x938]
push ebx
push ebp
push esi
push edi
xor edi, edi
push 0x3ff
mov esi, ecx
lea ecx, [esp + 0x545]
push edi
mov bl, 0x30
push ecx
mov dword [esp + 0x40], eax
xor ebp, ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x34], edi
mov byte [esp + 0x54c], bl
call fcn.00412eb0
push 0x3ff
lea edx, [esp + 0x151]
push ebp
push edx
mov byte [esp + 0x158], bl
call fcn.00412eb0
push 0x5969f8
push esi
call fcn.0040a750
mov esi, eax
add esp, 0x20
test esi, esi
je 0x407d6a
jmp 0x407bf0
push 8
push str.gateway
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407c0c
lea ebp, [esi + 8]
jmp 0x407d51
push 7
push str.domain
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407c2c
add esi, 7
mov dword [esp + 0x2c], esi
jmp 0x407d51
push 0xa
push str.svpnginfo
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407c4c
add esi, 0xa
mov dword [esp + 0x14], esi
jmp 0x407d51
push 5
push 0x5962fc
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407c6c
add esi, 5
mov dword [esp + 0x10], esi
jmp 0x407d51
push 5
push str.logindomain
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407c8c
add esi, 0xc
mov dword [esp + 0x30], esi
jmp 0x407d51
push 9
push str.authmode
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407cac
add esi, 9
mov dword [esp + 0x18], esi
jmp 0x407d51
push 9
push str.authtype
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407ccc
add esi, 9
mov dword [esp + 0x24], esi
jmp 0x407d51
push 9
push str.username
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407cfc
mov edx, dword [esp + 0x34]
lea edi, [esi + 9]
mov eax, edi
sub edx, edi
jmp 0x407cf0
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x407cf0
jmp 0x407d51
push 8
push str.private
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407d19
add esi, 8
mov dword [esp + 0x20], esi
jmp 0x407d51
push 4
push str.url
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407d36
add esi, 4
mov dword [esp + 0x1c], esi
jmp 0x407d51
push 0xb
push str.openwebres
push esi
call fcn.004196c9
add esp, 0xc
test eax, eax
jne 0x407d51
add esi, 0xb
mov dword [esp + 0x28], esi
push 0x5969f8
push 0
call fcn.0040a750
mov esi, eax
add esp, 8
test esi, esi
jne 0x407bf0
xor eax, eax
test ebp, ebp
je 0x407d80
cmp byte [ebp], al
je 0x407d80
inc eax
cmp byte [eax + ebp], 0
jne 0x407d75
test eax, eax
jne 0x407da6
mov ebp, dword [esp + 0x2c]
xor eax, eax
test ebp, ebp
je 0x407fce
cmp byte [ebp], al
je 0x407fce
inc eax
cmp byte [eax + ebp], 0
jne 0x407d97
test eax, eax
je 0x407fce
test ebp, ebp
je 0x407fce
cmp dword [esp + 0x14], 0
je 0x407fce
mov esi, dword [esp + 0x10]
test esi, esi
je 0x407fce
test edi, edi
je 0x407fce
mov ebx, dword [esp + 0x30]
lea eax, [esp + 0x540]
push eax
call fcn.00408160
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x144]
push ecx
call fcn.00408160
mov eax, str._AuthPara__r_n__ConnTypeSSLVPN_r_n__GateWayIP_s_r_n__GateWayPort_s_r_n__LoginDomain_s_r_n__SvpnUid_s_r_n__Private_s_r_n__AuthenticationMode_s_r_n__AuthenticationType_s_r_n__URL_s_r_n__OpenWebResource_s_r_n__Logout__xml_logout.cgi_r_n
add esp, 8
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407e00
sub eax, edx
mov ecx, ebp
mov edx, eax
call fcn.00407b30
mov ecx, esi
mov ebx, eax
call fcn.00407b30
mov edi, eax
add ebx, edx
xor eax, eax
add edi, ebx
cmp byte [esp + 0x540], al
je 0x407e3b
lea esp, [esp]
inc eax
cmp byte [esp + eax + 0x540], 0
jne 0x407e30
xor edx, edx
add edi, eax
cmp byte [esp + 0x140], dl
je 0x407e5b
jmp 0x407e50
inc edx
cmp byte [esp + edx + 0x140], 0
jne 0x407e50
mov ecx, dword [esp + 0x28]
call fcn.00407b30
mov ecx, dword [esp + 0x1c]
mov esi, eax
call fcn.00407b30
mov ecx, dword [esp + 0x20]
add esi, eax
call fcn.00407b30
mov ecx, dword [esp + 0x24]
add esi, eax
call fcn.00407b30
mov ecx, dword [esp + 0x18]
mov ebx, eax
add ebx, edx
call fcn.00407b30
add ebx, esi
add eax, ebx
add edi, eax
push edi
push str.Config_file_length:__d
call fcn.00402730
lea ebx, [edi + 1]
push ebx
call fcn.00409d81
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x407ebd
lea eax, [esi - 4]
jmp 0x407fde
push ebx
push 0
push esi
call fcn.00412eb0
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x34]
push ecx
push edx
push eax
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x160]
push ecx
lea edx, [esp + 0x564]
push edx
push eax
push ebp
push str._AuthPara__r_n__ConnTypeSSLVPN_r_n__GateWayIP_s_r_n__GateWayPort_s_r_n__LoginDomain_s_r_n__SvpnUid_s_r_n__Private_s_r_n__AuthenticationMode_s_r_n__AuthenticationType_s_r_n__URL_s_r_n__OpenWebResource_s_r_n__Logout__xml_logout.cgi_r_n
push esi
call fcn.00409b67
push esi
push str.config_file:__s
call fcn.00402730
add esp, 0x40
push 0x104
lea ecx, [esp + 0x3c]
push ecx
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [esp + 0x38]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x407f28
mov edx, dword [str.config.ini]
mov ecx, dword [0x59752c]
mov dword [eax], edx
mov edx, dword [0x597530]
mov dword [eax + 4], ecx
mov dword [eax + 8], edx
lea eax, [esp + 0x38]
push eax
push str.config_file_location:__s
call fcn.00402730
lea ecx, [esp + 0x40]
push 0x597550
push ecx
call fcn.0040aea0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x407f89
push esi
call fcn.00409ca4
push str.open_file_failed.
call fcn.00402730
add esp, 8
lea eax, [ebx - 2]
jmp 0x407fde
push ebx
push 1
push edi
push esi
call fcn.0040b251
add esp, 0x10
cmp eax, 1
je 0x407fbb
push esi
call fcn.00409ca4
push str.write_config_failed.
call fcn.00402730
push ebx
call fcn.0040b073
add esp, 0xc
mov eax, 0xfffffffd
jmp 0x407fde
push ebx
call fcn.0040b073
push esi
call fcn.00409ca4
add esp, 8
xor eax, eax
jmp 0x407fde
push str.NULL_parameter_.
call fcn.00402730
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0x940]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00409b58
add esp, 0x934
ret