Function at 0x49f580
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push ebx
sub esp, 0x414
fldz
fld qword [0x2205058]
mov edx, dword [0x52ec00]
fucomp st(1)
fnstsw ax
xor edx, ebp
mov dword [ebp - 0x10], edx
sahf
mov ebx, dword [ebp + 8]
jp 0x49f5af
je 0x49fc03
fstp st(0)
test ebx, ebx
je 0x49fbf4
push str.libicaf.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x49f5de
push str.for_rtl_ICAF_INIT
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edx, eax
test edx, edx
jne 0x49fbe0
push 0x3e9
push 0
lea edi, [ebp - 0x3fc]
push edi
call fcn.004c6960
add esp, 0xc
push 0x3e8
push edi
push str.PIN_VM_LD_LIBRARY_PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
jbe 0x49f616
cmp esi, 0x3e8
jae 0x49f616
inc esi
jmp 0x49f61d
mov byte [ebp - 0x3fc], 0
call fcn.004de1d1
xor ebx, ebx
test esi, esi
mov eax, dword [eax]
sete bl
or eax, ebx
je 0x49f669
push 0x3e8
push edi
push str.PIN_APP_LD_LIBRARY_PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
jbe 0x49f65a
cmp esi, 0x3e8
jae 0x49fc23
xor ebx, ebx
inc esi
sete bl
jmp 0x49f669
mov ebx, 0
mov byte [ebp - 0x3fc], 0
sete bl
call fcn.004de1d1
or ebx, dword [eax]
je 0x49f69b
push 0x3e8
push edi
push str.PIN_CRT_TZDATA
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
jbe 0x49f694
cmp esi, 0x3e8
jae 0x49f694
inc esi
jmp 0x49f69b
mov byte [ebp - 0x3fc], 0
call fcn.004de1d1
cmp dword [eax], 0
mov eax, 0
sete al
test eax, esi
je 0x49f799
xor eax, eax
lea edx, [ebp - 0x40c]
push eax
push eax
push edx
call fcn.004deecc
xor eax, eax
push eax
push eax
push eax
call fcn.0049ee90
add esp, 0x18
mov ecx, dword [ebp - 0x40c]
mov ebx, ecx
not ecx
and ebx, 0x1000000
mov esi, ecx
mov edi, ecx
and esi, 2
and edi, 4
shr ebx, 8
mov edx, ecx
shr esi, 1
and edx, 8
shr edi, 1
or ebx, esi
mov esi, ecx
or ebx, edi
shr edx, 1
and esi, 0x10
and ecx, 1
or ebx, edx
shr esi, 1
mov edx, 0x220506c
shl ecx, 4
or ebx, esi
or ecx, eax
or ebx, ecx
and ebx, 0xfc1fffff
mov eax, ebx
xchg dword [edx], eax
mov esi, ebx
mov edx, ebx
and esi, 1
and edx, 2
add esi, esi
mov ecx, ebx
xor esi, 0x1f
add edx, edx
and ecx, 4
mov edi, ebx
xor esi, edx
add ecx, ecx
and edi, 8
mov edx, ebx
xor esi, ecx
add edi, edi
and edx, 0x10
xor esi, edi
shr edx, 4
xor esi, edx
test ebx, 0x10000
je 0x49f767
test ebx, 0x200
lea edx, [esi + 0x1000000]
jne 0x49f767
mov esi, edx
xor edx, edx
lea ecx, [ebp - 0x408]
push edx
push edx
push ecx
call fcn.004deecc
push 0x308001f
push esi
lea edx, [ebp - 0x418]
push edx
call fcn.004deecc
push ebx
mov eax, 1
push eax
push eax
call fcn.0049ee90
add esp, 0x24
call fcn.0044aa20
push 0x2205060
call fcn.0044a8c0
add esp, 4
mov eax, dword [0x2205064]
test eax, eax
je 0x49f7d4
xor eax, eax
mov dword [0x2205060], eax
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
xor ecx, ebp
cmp ecx, dword [0x52ec00]
je 0x49fb06
call fcn.004cba1b
lea eax, [ebp - 0x414]
push eax
push 0
push 0xc
call fcn.00480eb0
add esp, 0xc
mov eax, dword [ebp - 0x414]
test eax, eax
jne 0x49f7fd
mov dword [0x5e4e3e8], 0
jmp 0x49f82c
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x414]
push 0x49db70
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0x414]
mov dword [ecx], edx
mov ebx, dword [ebp - 0x414]
mov dword [0x5e4e3e8], ebx
call fcn.004cbc65
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push str.FOR_DISABLE_CONSOLE_CTRL_HANDLER
call fcn.00494a40
add esp, 4
test eax, eax
jne 0x49f852
push 1
push 0x49dd00
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push 0x4ab400
call fcn.004cb4c0
push 0x4ab430
call fcn.004cb4c0
push str.FOR_NOERROR_DIALOGS
call fcn.00494a40
add esp, 0xc
test eax, eax
jne 0x49fbd0
call fcn.004defd2
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
call fcn.004cb4c0
add esp, 4
mov dword [0x5e4e3e0], 0
mov dword [0x5e4e3e4], 0x2205068
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
mov ecx, esi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x49f8c4
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x49f8af
dec eax
mov edx, eax
lea eax, [ebp - 0x404]
push eax
push 0
inc edx
push edx
call fcn.00480eb0
add esp, 0xc
mov ebx, dword [ebp - 0x404]
test ebx, ebx
je 0x49fbab
mov ecx, esi
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x49f900
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x49f8eb
dec eax
lea eax, [esi + eax - 1]
cmp esi, eax
ja 0x49fa0d
xor edx, edx
mov edi, 1
mov dword [ebp - 0x400], edx
mov edx, eax
mov eax, ebx
mov ebx, edx
cmp esi, ebx
ja 0x49fa0d
movsx edx, byte [esi]
cmp edx, 0x20
je 0x49fb68
cmp edx, 9
je 0x49fb68
mov ecx, dword [0x5e4e3e0]
inc ecx
mov dword [0x5e4e3e0], ecx
cmp ecx, edi
jle 0x49f98a
cmp edi, 1
je 0x49fb6e
add edi, 0xa
lea edx, [edi*4 - 0x28]
push edx
push 0x5e4e3e4
lea ecx, [edi*4]
push ecx
call fcn.00480f00
add esp, 0xc
test eax, eax
jne 0x49fa0d
mov eax, dword [ebp - 0x404]
mov ecx, dword [0x5e4e3e0]
mov edx, dword [0x5e4e3e4]
mov dword [ebp - 0x410], edi
mov edi, dword [ebp - 0x400]
mov dword [edx + ecx*4 - 4], eax
xor ecx, ecx
mov eax, dword [ebp - 0x404]
movsx edx, byte [esi]
cmp edx, 0x22
jne 0x49f9da
inc esi
test edi, edi
jne 0x49f9c2
movsx edx, byte [esi]
cmp edx, 0x22
jne 0x49fb0e
inc esi
movsx edx, byte [esi]
cmp edx, 0x22
je 0x49fb41
mov edi, ecx
cmp edx, 0x20
jne 0x49f9e7
jmp 0x49fb18
test edi, edi
jne 0x49f9f0
cmp edx, 0x20
je 0x49fb18
cmp edx, 9
je 0x49fb18
mov byte [eax], dl
inc esi
mov eax, dword [ebp - 0x404]
inc eax
mov dword [ebp - 0x404], eax
cmp esi, ebx
jbe 0x49f9a8
mov byte [eax], 0
inc dword [ebp - 0x404]
mov ebx, dword [0x220506c]
mov eax, ebx
and eax, 1
mov edx, ebx
add eax, eax
and edx, 2
mov ecx, ebx
xor eax, 0x1f
add edx, edx
and ecx, 4
mov esi, ebx
xor eax, edx
add ecx, ecx
and esi, 8
mov edi, ebx
xor eax, ecx
add esi, esi
and edi, 0x10
shr edi, 4
xor eax, esi
xor eax, edi
test ebx, 0x10000
je 0x49fa5a
test ebx, 0x200
lea edx, [eax + 0x1000000]
jne 0x49fa5a
mov eax, edx
push 0x308001f
push eax
lea eax, [ebp - 0x410]
push eax
call fcn.004deecc
push ebx
mov eax, 1
push eax
push eax
call fcn.0049ee90
add esp, 0x18
call fcn.004ab520
call fcn.00486f50
call fcn.004ab7a0
push str.FOR_FASTMEM_NORETRY
call fcn.00494a40
add esp, 4
test eax, eax
je 0x49faa6
push 1
call fcn.00480f90
add esp, 4
push str.FOR_FASTMEM_RETRY_WARN
call fcn.00494a40
add esp, 4
test eax, eax
je 0x49fac1
push 2
call fcn.00480f90
add esp, 4
push str.FOR_FASTMEM_RETRY
call fcn.00494a40
add esp, 4
test eax, eax
je 0x49fadc
push 3
call fcn.00480f90
add esp, 4
call fcn.00480fb0
mov dword [0x2205064], 1
xor eax, eax
mov dword [0x2205060], eax
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x49f7cf
lea esp, [ebp - 0xc]
pop ebx
pop edi
pop esi
pop ebp
ret
mov edi, 1
jmp 0x49f9f0
mov dword [ebp - 0x400], edi
mov edi, dword [ebp - 0x410]
mov byte [eax], 0
mov eax, dword [ebp - 0x404]
inc eax
mov dword [ebp - 0x404], eax
cmp esi, ebx
jbe 0x49f927
jmp 0x49fa0d
cmp esi, ebx
ja 0x49fb62
inc esi
mov byte [eax], 0x22
mov eax, dword [ebp - 0x404]
inc eax
mov dword [ebp - 0x404], eax
movsx edx, byte [esi]
cmp edx, 0x22
jne 0x49f9ce
inc esi
jmp 0x49f9b5
inc esi
jmp 0x49f91f
push 0x5e4e3e4
push 0
push 0x2c
call fcn.00480eb0
add esp, 0xc
test eax, eax
jne 0x49fa0d
mov ecx, dword [0x5e4e3e4]
mov edi, 0xb
mov edx, dword [0x2205068]
mov dword [ecx], edx
mov eax, dword [ebp - 0x404]
mov ecx, dword [0x5e4e3e0]
jmp 0x49f98a
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
cmp ecx, dword [0x52ec00]
jne 0x49f7cf
push 0xdc2
push str.for_init.c
push str.to_ptr
call fcn.004d236a
push 0x8003
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
jmp 0x49f87b
push fcn.0047e600
lea eax, [ebp + 0xc]
push eax
push ebx
call edx
add esp, 0xc
jmp 0x49f5de
cmp dword [ebp + 0xc], 0
jne 0x49f5b9
jmp 0x49f5de
fstp qword [ebp - 0x420]
lea eax, [ebp - 0x420]
push eax
call fcn.004ab9e0
add esp, 4
fstp qword [0x2205058]
jmp 0x49f5b1
test esi, esi
jmp 0x49f65a