Function at 0x496180
Capabilities:
Resolve function by parsing pe exports
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4ec2a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push 2
mov dword [esp + 0x18], esi
mov dword [esp + 0x58], ebp
call fcn.00449130
add esp, 4
cmp eax, ebp
mov dword [esp + 0x54], eax
je 0x4961bb
mov word [eax], bp
push ebx
push edi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], ebp
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x4efd50
mov dword [esp + 0x90], ebp
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00449130
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4efd50
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add esp, 4
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x24], eax
push 0x4f3f00
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00449130
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4f3f00
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add esp, 4
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x2c], eax
push 0x4f6cc0
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00449130
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4f6cc0
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add esp, 4
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x14], eax
push 0x4efd50
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00449130
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4efd50
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x54], eax
push 2
mov dword [esp + 0x50], 0xffffffff
call fcn.00449130
add esp, 8
cmp eax, ebp
mov dword [esp + 0x4c], eax
je 0x4962b4
mov word [eax], bp
mov esi, dword [esp + 0x94]
xor eax, eax
xor ebp, ebp
xor ecx, ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x78], ecx
mov dword [esp + 0x74], eax
mov ax, word [esi]
cmp ax, bp
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], ecx
mov byte [esp + 0x8c], 5
mov dword [esp + 0x68], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x20], 0xffffff9c
mov dword [esp + 0x54], ebp
mov ecx, 1
je 0x496687
lea esp, [esp]
cmp ax, 9
jb 0x496330
cmp ax, 0xd
jbe 0x496683
cmp ax, 0x20
je 0x496683
cmp ax, 0x2d
je 0x49638e
cmp ax, 0x2b
je 0x49638e
cmp ax, 0x2a
jne 0x496359
mov dword [esp + 0x18], 0x40
jmp 0x496630
cmp ax, 0x2e
jne 0x496368
mov dword [esp + 0x3c], ecx
jmp 0x496630
cmp ax, 0x7e
jne 0x49637b
mov dword [esp + 0x18], 0x80
jmp 0x496630
cmp ax, 0x3d
jne 0x496630
mov dword [esp + 0x58], ecx
jmp 0x496630
add esi, 2
mov dword [esp + 0x94], esi
mov eax, esi
mov ecx, str.svr2
mov edx, 3
movzx edi, word [eax]
movsx ebx, byte [ecx]
or edi, 0x20
or ebx, 0x20
add eax, 2
inc ecx
cmp ebx, edi
jne 0x4963cb
dec edx
jns 0x4963a4
mov dword [esp + 0x40], 2
add esi, 6
jmp 0x496630
mov eax, esi
mov ecx, 0x4fb5a8
mov edx, 2
movzx edi, word [eax]
movsx ebx, byte [ecx]
or edi, 0x20
or ebx, 0x20
add eax, 2
inc ecx
cmp ebx, edi
jne 0x4963fe
dec edx
jns 0x4963d7
mov dword [esp + 0x40], 1
add esi, 4
jmp 0x496630
push 3
push esi
push 0x4f4338
call fcn.004449d0
add esp, 0xc
test al, al
je 0x496420
or ebp, 0x10000
add esi, 4
jmp 0x496630
push 3
push esi
push 0x4f433c
call fcn.004449d0
add esp, 0xc
test al, al
je 0x496442
or ebp, 0x20000
add esi, 4
jmp 0x496630
push 4
push esi
push str.size
call fcn.004449d0
add esp, 0xc
test al, al
je 0x496464
or ebp, 0x40000
add esi, 6
jmp 0x496630
push 5
push esi
push str.close
call fcn.004449d0
add esp, 0xc
test al, al
je 0x496486
or ebp, 0x80000
add esi, 8
jmp 0x496630
push 3
push esi
push 0x4fb59c
call fcn.004449d0
add esp, 0xc
test al, al
je 0x4964a8
or ebp, 0x100000
add esi, 4
jmp 0x496630
push 3
push esi
push 0x4fb598
call fcn.004449d0
add esp, 0xc
test al, al
je 0x4964cc
mov dword [esp + 0x18], 0x40
add esi, 4
jmp 0x496630
push 2
push esi
push 0x4fb594
call fcn.004449d0
add esp, 0xc
test al, al
je 0x4964e8
add esi, 2
jmp 0x496628
push 3
push esi
push 0x4f427c
call fcn.004449d0
add esp, 0xc
test al, al
je 0x49650c
mov dword [esp + 0x3c], 1
add esi, 4
jmp 0x496630
push 4
push esi
push str.icon
call fcn.004449d0
add esp, 0xc
test al, al
je 0x4965dd
mov ax, word [esi + 8]
add esi, 8
cmp ax, 0x2a
jne 0x496584
cmp word [esi + 2], ax
jne 0x496573
lea edx, [esp + 0x94]
add esi, 4
push edx
mov dword [esp + 0x98], esi
mov edi, esi
call fcn.00417de5
mov esi, dword [esp + 0x98]
mov eax, esi
sub eax, edi
add esp, 4
sar eax, 1
push eax
push edi
lea ecx, [esp + 0x54]
call fcn.00449600
sub esi, 2
jmp 0x496630
cmp ax, 0x2a
jne 0x496584
add esi, 2
mov dword [esp + 0x54], 0x40000000
mov ax, word [esi]
mov ecx, esi
mov dword [esp + 0x44], ecx
call fcn.0043af40
test al, al
je 0x4965b0
jmp 0x4965a0
mov ax, word [esi + 2]
add esi, 2
call fcn.0043af40
test al, al
jne 0x4965a0
mov ax, word [ecx]
sub esi, 2
call fcn.0043af40
test al, al
je 0x4965d3
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.0044ce90
add esp, 8
jmp 0x496630
mov dword [esp + 0x20], 0xffffffff
jmp 0x496630
push 3
push esi
push 0x4fb588
call fcn.004449d0
add esp, 0xc
test al, al
jne 0x496646
push 4
push esi
push str.tbin
call fcn.004449d0
add esp, 0xc
test al, al
je 0x496612
mov dword [esp + 0x18], 0x80
add esi, 6
jmp 0x496630
cmp word [esi - 2], 0x2d
jne 0x496630
mov ax, word [esi]
call fcn.00447e90
test al, al
jne 0x496630
add esi, 0xfffffffe
mov dword [esp + 0x18], 0xc0
mov ax, word [esi + 2]
add esi, 2
test ax, ax
je 0x496683
mov ecx, 1
jmp 0x496320
lea eax, [esp + 0x68]
push eax
lea ecx, [esp + 0x48]
add esi, 0xfffffffe
push ecx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x4c], esi
call fcn.00459c60
movsx edx, al
lea eax, [esp + 0x9c]
push eax
mov dword [esp + 0x84], edx
call fcn.00417de5
mov esi, dword [esp + 0xa0]
add esp, 0xc
jmp 0x496687
mov dword [esp + 0x28], ebp
mov ax, word [esi]
cmp ax, 9
jb 0x496696
cmp ax, 0xd
jbe 0x49669c
cmp ax, 0x20
jne 0x49669f
add esi, 2
mov eax, dword [esp + 0x20]
xor edi, edi
cmp eax, edi
jle 0x4966ae
and eax, 0x3fffffff
cmp eax, 0xffffffff
jge 0x4966b8
mov eax, 4
inc eax
cmp eax, 8
mov dword [esp + 0x20], eax
jg 0x4966cf
mov ecx, dword [eax*4 + 0x4fb55c]
mov dword [esp + 0x44], ecx
jmp 0x4966d7
mov dword [esp + 0x44], 0x40
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esi + eax*2 - 2]
xor ebp, ebp
cmp eax, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x38], edi
jb 0x496712
mov cx, word [eax]
cmp cx, 0x40
je 0x496712
cmp cx, 0x23
je 0x496712
cmp cx, 0x2a
je 0x496712
cmp cx, 0x24
je 0x496712
sub eax, 2
cmp eax, esi
jae 0x4966f0
cmp word [eax], 0x24
jne 0x496742
cmp eax, esi
lea edx, [eax + 2]
mov word [eax], di
mov dword [esp + 0x38], edx
jb 0x496742
mov cx, word [eax]
cmp cx, 0x40
je 0x496742
cmp cx, 0x23
je 0x496742
cmp cx, 0x2a
je 0x496742
sub eax, 2
cmp eax, esi
jae 0x496726
cmp word [eax], 0x2a
jne 0x49676c
cmp eax, esi
lea ecx, [eax + 2]
mov word [eax], di
mov dword [esp + 0x30], ecx
jb 0x49676c
mov cx, word [eax]
cmp cx, 0x40
je 0x49676c
cmp cx, 0x23
je 0x49676c
sub eax, 2
cmp eax, esi
jae 0x496756
cmp word [eax], 0x23
jne 0x4967b4
lea ebp, [eax + 2]
mov edx, ebp
mov word [eax], di
mov cx, word [edx]
cmp cx, di
je 0x4967a0
cmp cx, 9
jb 0x49678e
cmp cx, 0xd
jbe 0x4967a0
cmp cx, 0x20
je 0x4967a0
mov cx, word [edx + 2]
add edx, 2
cmp cx, di
jne 0x496782
cmp eax, esi
mov word [edx], di
jb 0x4967b4
cmp word [eax], 0x40
je 0x4967ba
sub eax, 2
cmp eax, esi
jae 0x4967a7
cmp word [eax], 0x40
jne 0x4967c0
mov word [eax], di
lea edi, [eax + 2]
mov eax, dword [esp + 0x1c]
mov cl, byte [eax + 0x8e]
test cl, cl
mov bl, 0xf
jne 0x4967e8
test byte [eax + 0xb], bl
jne 0x4967e8
push 1
push 0
lea edx, [esp + 0x2c]
push edx
push esi
mov ecx, eax
call fcn.004541d0
jmp 0x4967fb
mov ecx, dword [esp + 0x1c]
push 1
push 0
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.00452ca0
test edi, edi
mov esi, dword [esp + 0x1c]
je 0x496836
mov al, byte [esi + 0x8e]
test al, al
jne 0x496825
test byte [esi + 0xb], bl
jne 0x496825
push 1
push 0
lea ecx, [esp + 0x34]
push ecx
push edi
mov ecx, esi
call fcn.004541d0
jmp 0x496836
push 1
push 0
lea edx, [esp + 0x34]
push edx
push edi
mov ecx, esi
call fcn.00452ca0
test ebp, ebp
je 0x49686d
mov al, byte [esi + 0x8e]
test al, al
jne 0x49685c
test byte [esi + 0xb], bl
jne 0x49685c
push 1
push 0
lea eax, [esp + 0x1c]
push eax
push ebp
mov ecx, esi
call fcn.004541d0
jmp 0x49686d
push 1
push 0
lea ecx, [esp + 0x1c]
push ecx
push ebp
mov ecx, esi
call fcn.00452ca0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4968ae
push 1
push 0x24
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x68]
call fcn.00459430
or ecx, 0xffffffff
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
push 0x24
lea ecx, [esp + 0x34]
push ecx
push eax
call fcn.0044ca90
add esp, 0xc
test eax, eax
jle 0x4968ae
mov edx, dword [esp + 0x30]
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4968d8
push 1
push 0x2c
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x68]
call fcn.00459430
push 0
lea ecx, [esp + 0x54]
push ecx
push eax
call fcn.0044c770
add esp, 0xc
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x4968ef
mov edx, dword [esp + 0x24]
push 0
push edx
call fcn.00423b0c
add esp, 8
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x4f6cc0
push eax
xor ebp, ebp
xor esi, esi
mov ebx, 1
call edi
test eax, eax
jne 0x496910
jmp 0x49698d
mov ecx, dword [esp + 0x14]
push 0x4fb554
push ecx
call edi
test eax, eax
jne 0x49692c
mov ebp, 4
mov ebx, 7
jmp 0x49698d
mov edx, dword [esp + 0x14]
push 0x4fb54c
push edx
call edi
test eax, eax
jne 0x496943
mov ebp, 3
jmp 0x496988
mov eax, dword [esp + 0x14]
push 0x4fb544
push eax
call edi
test eax, eax
jne 0x49695c
mov ebp, 1
mov ebx, ebp
jmp 0x49698d
mov ecx, dword [esp + 0x14]
push str.RETRY
push ecx
call edi
test eax, eax
jne 0x496973
mov ebp, 5
jmp 0x496988
mov edx, dword [esp + 0x14]
push str.ABORT
push edx
call edi
test eax, eax
jne 0x49698d
mov ebp, 2
mov ebx, 2
mov eax, dword [esp + 0x50]
movzx eax, word [eax]
and eax, 0xffdf
add eax, 0xffffffcf
cmp eax, 0x28
ja case.0x4969a8.56
movzx ecx, byte [eax + 0x496c44]
jmp dword [ecx*4 + 0x496c18]
xor esi, esi
mov ebx, 6
jmp case.0x4969a8.56
mov esi, 0x100
jmp 0x496a15
xor esi, esi
mov ebx, 1
jmp case.0x4969a8.56
mov esi, 0x100
mov ebx, 2
jmp case.0x4969a8.56
mov esi, 0x200
mov ebx, 2
jmp case.0x4969a8.56
mov esi, 0x200
mov ebx, 3
jmp case.0x4969a8.56
mov esi, 0x300
mov ebx, 4
jmp case.0x4969a8.56
mov esi, 0x300
mov ebx, 5
jmp case.0x4969a8.56
mov esi, 0x300
mov ebx, 6
jmp case.0x4969a8.56
mov esi, 0x300
mov ebx, 7
mov edi, dword [esp + 0x98]
test edi, edi
mov byte [esp + 0x13], 0
je 0x496a31
mov al, byte [edi + 0x69]
test al, al
je 0x496a36
mov byte [esp + 0x13], 0x20
mov edx, dword [esp + 0x20]
push 1
mov dword [esp + 0x40], edx
call fcn.004a43e0
add esp, 4
xor eax, eax
test edi, edi
je 0x496a51
mov eax, dword [edi + 0x18]
mov ecx, dword [esp + 0x20]
test ecx, ecx
jl 0x496a6b
mov edx, dword [esp + 0x54]
test edx, edx
je 0x496a6b
or ecx, 0x40000000
mov edx, ecx
jmp 0x496a6f
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x496a9f
mov eax, dword [esp + 0x18]
or al, bl
mov ebx, dword [esp + 0x2c]
or esi, ebp
or esi, dword [esp + 0x44]
mov ebp, dword [esp + 0x24]
push eax
mov eax, dword [esp + 0x4c]
push eax
push esi
push ebx
push ebp
push ecx
call fcn.00485df0
add esp, 0x18
jmp 0x496b0a
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x496ac3
mov ebx, dword [esp + 0x44]
or esi, ebp
mov ebp, dword [esp + 0x24]
or esi, ebx
mov ebx, dword [esp + 0x2c]
push esi
push ebx
push ebp
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x496b0a
mov eax, dword [esp + 0x4c]
cmp word [eax], 0
jne 0x496ad3
lea eax, [edx + edx]
or eax, 1
mov edx, dword [esp + 0x48]
lea ecx, [esp + 0x68]
push ecx
push eax
mov eax, dword [esp + 0x20]
or al, bl
or al, byte [esp + 0x1b]
mov ebx, dword [esp + 0x30]
or esi, ebp
mov ebp, dword [esp + 0x2c]
or esi, ebx
mov ebx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x28]
push edx
push esi
push ebx
push ebp
push edi
push eax
call fcn.00486230
add esp, 0x24
cmp eax, 6
mov esi, 0x4efd50
jne 0x496b1b
mov esi, 0x4fb524
jmp 0x496b61
cmp eax, 7
jne 0x496b27
mov esi, 0x4fb51c
jmp 0x496b61
cmp eax, 2
jne 0x496b33
mov esi, str.CANCEL
jmp 0x496b61
cmp eax, 1
jne 0x496b3f
mov esi, 0x4f6cc0
jmp 0x496b61
cmp eax, 4
jne 0x496b4b
mov esi, str.RETRY
jmp 0x496b61
cmp eax, 5
jne 0x496b57
mov esi, str.IGNORE
jmp 0x496b61
cmp eax, 3
jne 0x496b61
mov esi, str.ABORT
mov ecx, dword [esp + 0x1c]
push esi
push str.YESNO
call fcn.00448be0
push esi
push 0x4fb4f0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [esp + 0x4c]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x496b99
mov ecx, dword [0x51d3c8]
add eax, 0xfffffff8
push eax
push 0
push ecx
call esi
mov edx, dword [esp + 0x50]
mov eax, dword [0x51d3c8]
add edx, 0xfffffff8
push edx
push 0
push eax
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x496bc2
mov ecx, dword [0x51d3c8]
add eax, 0xfffffff8
push eax
push 0
push ecx
call esi
test ebx, ebx
je 0x496bd5
mov edx, dword [0x51d3c8]
add ebx, 0xfffffff8
push ebx
push 0
push edx
call esi
test ebp, ebp
pop edi
pop ebx
je 0x496be9
mov eax, dword [0x51d3c8]
add ebp, 0xfffffff8
push ebp
push 0
push eax
call esi
mov eax, dword [esp + 0x54]
test eax, eax
je 0x496c00
mov ecx, dword [0x51d3c8]
add eax, 0xfffffff8
push eax
push 0
push ecx
call esi
mov ecx, dword [esp + 0x7c]
pop esi
xor eax, eax
pop ebp
mov dword fs:[0], ecx
add esp, 0x80
ret 8