Function at 0x49e640
Capabilities:
Extract resource via kernel32 functions
Resolve function by parsing pe exports
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x4e8440
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.00445f00
add esp, 4
cmp eax, ebp
mov dword [esp + 0x54], eax
je 0x49e67b
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 0x4ebd38
mov dword [esp + 0x90], ebp
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00445f00
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4ebd38
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 0x4ef8e0
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00445f00
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4ef8e0
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 0x4f1ff8
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00445f00
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4f1ff8
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 0x4ebd38
call ebx
lea esi, [eax + eax + 2]
lea eax, [esi + 2]
push eax
call fcn.00445f00
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x4ebd38
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.00445f00
add esp, 8
cmp eax, ebp
mov dword [esp + 0x4c], eax
je 0x49e774
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 0x49eb47
lea esp, [esp]
cmp ax, 9
jb 0x49e7f0
cmp ax, 0xd
jbe 0x49eb43
cmp ax, 0x20
je 0x49eb43
cmp ax, 0x2d
je 0x49e84e
cmp ax, 0x2b
je 0x49e84e
cmp ax, 0x2a
jne 0x49e819
mov dword [esp + 0x18], 0x40
jmp 0x49eaf0
cmp ax, 0x2e
jne 0x49e828
mov dword [esp + 0x3c], ecx
jmp 0x49eaf0
cmp ax, 0x7e
jne 0x49e83b
mov dword [esp + 0x18], 0x80
jmp 0x49eaf0
cmp ax, 0x3d
jne 0x49eaf0
mov dword [esp + 0x58], ecx
jmp 0x49eaf0
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 0x49e88b
dec edx
jns 0x49e864
mov dword [esp + 0x40], 2
add esi, 6
jmp 0x49eaf0
mov eax, esi
mov ecx, 0x4f774c
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 0x49e8be
dec edx
jns 0x49e897
mov dword [esp + 0x40], 1
add esi, 4
jmp 0x49eaf0
push 3
push esi
push 0x4efc7c
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e8e0
or ebp, 0x10000
add esi, 4
jmp 0x49eaf0
push 3
push esi
push 0x4efc80
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e902
or ebp, 0x20000
add esi, 4
jmp 0x49eaf0
push 4
push esi
push str.size
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e924
or ebp, 0x40000
add esi, 6
jmp 0x49eaf0
push 5
push esi
push str.close
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e946
or ebp, 0x80000
add esi, 8
jmp 0x49eaf0
push 3
push esi
push 0x4f7740
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e968
or ebp, 0x100000
add esi, 4
jmp 0x49eaf0
push 3
push esi
push 0x4f773c
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e98c
mov dword [esp + 0x18], 0x40
add esi, 4
jmp 0x49eaf0
push 2
push esi
push 0x4f7738
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e9a8
add esi, 2
jmp 0x49eae8
push 3
push esi
push 0x4efbdc
call fcn.00440450
add esp, 0xc
test al, al
je 0x49e9cc
mov dword [esp + 0x3c], 1
add esi, 4
jmp 0x49eaf0
push 4
push esi
push str.icon
call fcn.00440450
add esp, 0xc
test al, al
je 0x49ea9d
mov ax, word [esi + 8]
add esi, 8
cmp ax, 0x2a
jne 0x49ea44
cmp word [esi + 2], ax
jne 0x49ea33
lea edx, [esp + 0x94]
add esi, 4
push edx
mov dword [esp + 0x98], esi
mov edi, esi
call fcn.0041676d
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.004463d0
sub esi, 2
jmp 0x49eaf0
cmp ax, 0x2a
jne 0x49ea44
add esi, 2
mov dword [esp + 0x54], 0x40000000
mov ax, word [esi]
mov ecx, esi
mov dword [esp + 0x44], ecx
call fcn.00445b20
test al, al
je 0x49ea70
jmp 0x49ea60
mov ax, word [esi + 2]
add esi, 2
call fcn.00445b20
test al, al
jne 0x49ea60
mov ax, word [ecx]
sub esi, 2
call fcn.00445b20
test al, al
je 0x49ea93
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x48]
push edx
call fcn.00449a90
add esp, 8
jmp 0x49eaf0
mov dword [esp + 0x20], 0xffffffff
jmp 0x49eaf0
push 3
push esi
push 0x4f772c
call fcn.00440450
add esp, 0xc
test al, al
jne 0x49eb06
push 4
push esi
push str.tbin
call fcn.00440450
add esp, 0xc
test al, al
je 0x49ead2
mov dword [esp + 0x18], 0x80
add esi, 6
jmp 0x49eaf0
cmp word [esi - 2], 0x2d
jne 0x49eaf0
mov ax, word [esi]
call fcn.00443740
test al, al
jne 0x49eaf0
add esi, 0xfffffffe
mov dword [esp + 0x18], 0xc0
mov ax, word [esi + 2]
add esi, 2
test ax, ax
je 0x49eb43
mov ecx, 1
jmp 0x49e7e0
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.0045ac50
movsx edx, al
lea eax, [esp + 0x9c]
push eax
mov dword [esp + 0x84], edx
call fcn.0041676d
mov esi, dword [esp + 0xa0]
add esp, 0xc
jmp 0x49eb47
mov dword [esp + 0x28], ebp
mov ax, word [esi]
cmp ax, 9
jb 0x49eb56
cmp ax, 0xd
jbe 0x49eb5c
cmp ax, 0x20
jne 0x49eb5f
add esi, 2
mov eax, dword [esp + 0x20]
xor edi, edi
cmp eax, edi
jle 0x49eb6e
and eax, 0x3fffffff
cmp eax, 0xffffffff
jge 0x49eb78
mov eax, 4
inc eax
cmp eax, 8
mov dword [esp + 0x20], eax
jg 0x49eb8f
mov ecx, dword [eax*4 + 0x4f7700]
mov dword [esp + 0x44], ecx
jmp 0x49eb97
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 0x49ebd2
mov cx, word [eax]
cmp cx, 0x40
je 0x49ebd2
cmp cx, 0x23
je 0x49ebd2
cmp cx, 0x2a
je 0x49ebd2
cmp cx, 0x24
je 0x49ebd2
sub eax, 2
cmp eax, esi
jae 0x49ebb0
cmp word [eax], 0x24
jne 0x49ec02
cmp eax, esi
lea edx, [eax + 2]
mov word [eax], di
mov dword [esp + 0x38], edx
jb 0x49ec02
mov cx, word [eax]
cmp cx, 0x40
je 0x49ec02
cmp cx, 0x23
je 0x49ec02
cmp cx, 0x2a
je 0x49ec02
sub eax, 2
cmp eax, esi
jae 0x49ebe6
cmp word [eax], 0x2a
jne 0x49ec2c
cmp eax, esi
lea ecx, [eax + 2]
mov word [eax], di
mov dword [esp + 0x30], ecx
jb 0x49ec2c
mov cx, word [eax]
cmp cx, 0x40
je 0x49ec2c
cmp cx, 0x23
je 0x49ec2c
sub eax, 2
cmp eax, esi
jae 0x49ec16
cmp word [eax], 0x23
jne 0x49ec74
lea ebp, [eax + 2]
mov edx, ebp
mov word [eax], di
mov cx, word [edx]
cmp cx, di
je 0x49ec60
cmp cx, 9
jb 0x49ec4e
cmp cx, 0xd
jbe 0x49ec60
cmp cx, 0x20
je 0x49ec60
mov cx, word [edx + 2]
add edx, 2
cmp cx, di
jne 0x49ec42
cmp eax, esi
mov word [edx], di
jb 0x49ec74
cmp word [eax], 0x40
je 0x49ec7a
sub eax, 2
cmp eax, esi
jae 0x49ec67
cmp word [eax], 0x40
jne 0x49ec80
mov word [eax], di
lea edi, [eax + 2]
mov eax, dword [esp + 0x1c]
mov cl, byte [eax + 0x8a]
test cl, cl
mov bl, 0xf
jne 0x49eca8
test byte [eax + 0xb], bl
jne 0x49eca8
push 1
push 0
lea edx, [esp + 0x2c]
push edx
push esi
mov ecx, eax
call fcn.004531a0
jmp 0x49ecbb
mov ecx, dword [esp + 0x1c]
push 1
push 0
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.00451c30
test edi, edi
mov esi, dword [esp + 0x1c]
je 0x49ecf6
mov al, byte [esi + 0x8a]
test al, al
jne 0x49ece5
test byte [esi + 0xb], bl
jne 0x49ece5
push 1
push 0
lea ecx, [esp + 0x34]
push ecx
push edi
mov ecx, esi
call fcn.004531a0
jmp 0x49ecf6
push 1
push 0
lea edx, [esp + 0x34]
push edx
push edi
mov ecx, esi
call fcn.00451c30
test ebp, ebp
je 0x49ed2d
mov al, byte [esi + 0x8a]
test al, al
jne 0x49ed1c
test byte [esi + 0xb], bl
jne 0x49ed1c
push 1
push 0
lea eax, [esp + 0x1c]
push eax
push ebp
mov ecx, esi
call fcn.004531a0
jmp 0x49ed2d
push 1
push 0
lea ecx, [esp + 0x1c]
push ecx
push ebp
mov ecx, esi
call fcn.00451c30
mov eax, dword [esp + 0x30]
test eax, eax
je 0x49ed6e
push 1
push 0x24
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x68]
call fcn.0045a420
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.00449690
add esp, 0xc
test eax, eax
jle 0x49ed6e
mov edx, dword [esp + 0x30]
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x38]
test eax, eax
je 0x49ed98
push 1
push 0x2c
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x68]
call fcn.0045a420
push 0
lea ecx, [esp + 0x54]
push ecx
push eax
call fcn.00449370
add esp, 0xc
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x49edaf
mov edx, dword [esp + 0x24]
push 0
push edx
call fcn.00422709
add esp, 8
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x4f1ff8
push eax
xor ebp, ebp
xor esi, esi
mov ebx, 1
call edi
test eax, eax
jne 0x49edd0
jmp 0x49ee4d
mov ecx, dword [esp + 0x14]
push 0x4f76f8
push ecx
call edi
test eax, eax
jne 0x49edec
mov ebp, 4
mov ebx, 7
jmp 0x49ee4d
mov edx, dword [esp + 0x14]
push 0x4f76f0
push edx
call edi
test eax, eax
jne 0x49ee03
mov ebp, 3
jmp 0x49ee48
mov eax, dword [esp + 0x14]
push 0x4f76e8
push eax
call edi
test eax, eax
jne 0x49ee1c
mov ebp, 1
mov ebx, ebp
jmp 0x49ee4d
mov ecx, dword [esp + 0x14]
push str.RETRY
push ecx
call edi
test eax, eax
jne 0x49ee33
mov ebp, 5
jmp 0x49ee48
mov edx, dword [esp + 0x14]
push str.ABORT
push edx
call edi
test eax, eax
jne 0x49ee4d
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.0x49ee68.56
movzx ecx, byte [eax + 0x49f154]
jmp dword [ecx*4 + 0x49f128]
xor esi, esi
mov ebx, 6
jmp case.0x49ee68.56
mov esi, 0x100
jmp 0x49eed5
xor esi, esi
mov ebx, 1
jmp case.0x49ee68.56
mov esi, 0x100
mov ebx, 2
jmp case.0x49ee68.56
mov esi, 0x200
mov ebx, 2
jmp case.0x49ee68.56
mov esi, 0x200
mov ebx, 3
jmp case.0x49ee68.56
mov esi, 0x300
mov ebx, 4
jmp case.0x49ee68.56
mov esi, 0x300
mov ebx, 5
jmp case.0x49ee68.56
mov esi, 0x300
mov ebx, 6
jmp case.0x49ee68.56
mov esi, 0x300
mov ebx, 7
mov edi, dword [esp + 0x98]
test edi, edi
mov byte [esp + 0x13], 0
je 0x49eef1
mov al, byte [edi + 0x69]
test al, al
je 0x49eef6
mov byte [esp + 0x13], 0x20
mov eax, dword [0x519464]
test eax, eax
mov edx, dword [esp + 0x20]
mov dword [esp + 0x3c], edx
je 0x49ef10
mov eax, dword [0x51948c]
test eax, eax
jne 0x49ef57
mov eax, dword [0x51907c]
push 5
push 0x271b
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ecx, dword [0x51907c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x49ef57
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x49ef57
mov edx, dword [0x51907c]
push 0
push 0x497fa0
push 0
push eax
push edx
call dword [sym.imp.USER32.dll_DialogBoxIndirectParamW]
xor eax, eax
test edi, edi
je 0x49ef60
mov eax, dword [edi + 0x18]
mov ecx, dword [esp + 0x20]
test ecx, ecx
jl 0x49ef7a
mov edx, dword [esp + 0x54]
test edx, edx
je 0x49ef7a
or ecx, 0x40000000
mov edx, ecx
jmp 0x49ef7e
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
test ecx, ecx
je 0x49efae
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.00484870
add esp, 0x18
jmp 0x49f019
mov ecx, dword [esp + 0x58]
test ecx, ecx
je 0x49efd2
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 0x49f019
mov eax, dword [esp + 0x4c]
cmp word [eax], 0
jne 0x49efe2
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.00484ca0
add esp, 0x24
cmp eax, 6
mov esi, 0x4ebd38
jne 0x49f02a
mov esi, 0x4f76c8
jmp 0x49f070
cmp eax, 7
jne 0x49f036
mov esi, 0x4f76c0
jmp 0x49f070
cmp eax, 2
jne 0x49f042
mov esi, str.CANCEL
jmp 0x49f070
cmp eax, 1
jne 0x49f04e
mov esi, 0x4f1ff8
jmp 0x49f070
cmp eax, 4
jne 0x49f05a
mov esi, str.RETRY
jmp 0x49f070
cmp eax, 5
jne 0x49f066
mov esi, str.IGNORE
jmp 0x49f070
cmp eax, 3
jne 0x49f070
mov esi, str.ABORT
mov ecx, dword [esp + 0x1c]
push esi
push str.YESNO
call fcn.00444550
push esi
push 0x4f7694
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov eax, dword [esp + 0x4c]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
je 0x49f0a8
mov ecx, dword [0x51927c]
add eax, 0xfffffff8
push eax
push 0
push ecx
call esi
mov edx, dword [esp + 0x50]
mov eax, dword [0x51927c]
add edx, 0xfffffff8
push edx
push 0
push eax
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x49f0d1
mov ecx, dword [0x51927c]
add eax, 0xfffffff8
push eax
push 0
push ecx
call esi
test ebx, ebx
je 0x49f0e4
mov edx, dword [0x51927c]
add ebx, 0xfffffff8
push ebx
push 0
push edx
call esi
test ebp, ebp
pop edi
pop ebx
je 0x49f0f8
mov eax, dword [0x51927c]
add ebp, 0xfffffff8
push ebp
push 0
push eax
call esi
mov eax, dword [esp + 0x54]
test eax, eax
je 0x49f10f
mov ecx, dword [0x51927c]
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