Function at 0x403f20
Capabilities:
Create thread

Disassembly:
sub esp, 0x6c
push ebx
mov ebx, dword [esp + 0x74]
push ebp
push esi
mov esi, dword [ebx + 8]
test esi, esi
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
jne 0x403f7b
mov esi, dword [esp + 0x8c]
mov eax, dword [esp + 0x88]
mov edx, dword [edx]
push 0x63
push esi
push eax
push ebx
call fcn.004ed570
cmp eax, 1
jne 0x404670
cmp dword [ebx + 8], eax
jge 0x404670
push 6
mov edx, esi
mov ecx, ebx
call fcn.004764c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x18
mov edx, dword [ebx + 0x40]
mov eax, edx
xor ecx, ecx
test eax, eax
je 0x404aa4
lea ebx, [ebx]
inc ecx
cmp ecx, esi
jge 0x403fab
mov eax, dword [eax + 0x40]
test eax, eax
jne 0x403f90
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x18
test eax, eax
je 0x404aa4
mov eax, edx
xor ecx, ecx
test eax, eax
je 0x404aa4
mov edi, 1
cmp dword [eax + 0x1c], edi
jne 0x403fe4
inc ecx
cmp ecx, esi
jge 0x403ff0
mov eax, dword [eax + 0x40]
test eax, eax
jne 0x403fc4
mov eax, 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x18
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x18
xor eax, eax
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x403ffe
mov ecx, dword [ebx]
mov byte [ecx], 0
mov ecx, dword [ebx + 8]
inc eax
cmp eax, ecx
jl 0x403ff2
mov edx, dword [esp + 0x84]
mov byte [edx], 0
cmp dword [ebx + 8], 2
mov eax, dword [ebx + 0x40]
jg 0x4045ed
mov ecx, dword [eax]
call fcn.004ed2a0
test eax, eax
je 0x40404f
mov ecx, dword [ebx + 0x40]
mov edx, dword [ecx]
push edx
call fcn.00563a6c
mov edi, eax
add esp, 4
cmp edi, 0x270e
jle 0x404047
mov edi, 0x270e
jmp 0x404054
test edi, edi
jge 0x404054
xor edi, edi
jmp 0x404054
mov edi, 0x270f
mov esi, dword [0x58d000]
xor ebp, ebp
test esi, esi
je 0x404109
cmp edi, 0x270f
jne 0x4040ef
mov eax, dword [ebx + 0x40]
mov ecx, dword [eax]
push esi
push ecx
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x4040fb
test esi, esi
je 0x404a72
mov ecx, dword [esp + 0x80]
mov eax, dword [ecx + 8]
cmp eax, 1
jne 0x404573
mov eax, dword [ecx + 0x10]
test eax, eax
je 0x404559
mov eax, dword [ecx]
push 0x2e
push eax
call fcn.00563c90
mov edi, eax
add esp, 8
test edi, edi
je 0x404559
push str..progid
push edi
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x40412d
mov edx, dword [esp + 0x84]
lea eax, [esi + 0x64]
sub edx, eax
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4040e0
jmp 0x404a72
test edi, edi
jne 0x4040f6
inc ebp
jmp 0x4040fb
dec edi
test edi, edi
jle 0x404083
mov esi, dword [esi + 0x1e4]
test esi, esi
jne 0x404064
test edi, edi
jne 0x404083
mov edx, dword [esp + 0x84]
push ebp
push 0x5748f8
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x404a72
push str..result
push edi
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x40417f
mov eax, dword [esi + 0x16c]
test eax, eax
jl 0x404a72
add esi, 0x138
mov edx, dword [esi]
mov eax, dword [esi + 4]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esi + 8]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0xc]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, dword [esp + 0x94]
call fcn.00402ad0
jmp 0x404a72
push str..error
push edi
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x4041c1
mov esi, dword [esi + 0x16c]
test esi, esi
jge 0x404a72
mov ecx, dword [esp + 0x84]
and esi, 0xffff
push esi
push 0x5748f0
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x404a72
push str..errortext
push edi
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x404469
mov esi, dword [esi + 0x16c]
test esi, esi
jge 0x404a72
cmp esi, 0x8002000e
jne 0x404206
mov edi, dword [esp + 0x84]
mov ecx, 5
mov esi, str.DISP_E_BADPARAMCOUNT
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jmp 0x404a72
cmp esi, 0x80020008
jne 0x404248
mov edx, dword [str.DISP_E_BADVARTYPE]
mov eax, dword [esp + 0x84]
mov dword [eax], edx
mov ecx, dword [0x574a5c]
mov dword [eax + 4], ecx
mov edx, dword [0x574a60]
mov dword [eax + 8], edx
mov ecx, dword [0x574a64]
mov dword [eax + 0xc], ecx
mov dx, word [0x574a68]
mov word [eax + 0x10], dx
jmp 0x404a72
cmp esi, 0x80020009
jne 0x404288
mov ecx, dword [str.DISP_E_EXCEPTION]
mov eax, dword [esp + 0x84]
mov dword [eax], ecx
mov edx, dword [0x574a48]
mov dword [eax + 4], edx
mov ecx, dword [0x574a4c]
mov dword [eax + 8], ecx
mov edx, dword [0x574a50]
mov dword [eax + 0xc], edx
mov cl, byte [0x574a54]
mov byte [eax + 0x10], cl
jmp 0x404a72
cmp esi, 0x80020003
jne 0x4042aa
mov edi, dword [esp + 0x84]
mov ecx, 5
mov esi, str.DISP_E_MEMBERNOTFOUND
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x404a72
cmp esi, 0x80020007
jne 0x4042f5
mov edx, dword [str.DISP_E_NONAMEDARGS]
mov eax, dword [esp + 0x84]
mov dword [eax], edx
mov ecx, dword [0x574a1c]
mov dword [eax + 4], ecx
mov edx, dword [0x574a20]
mov dword [eax + 8], edx
mov ecx, dword [0x574a24]
mov dword [eax + 0xc], ecx
mov dx, word [0x574a28]
mov word [eax + 0x10], dx
mov cl, byte [0x574a2a]
mov byte [eax + 0x12], cl
jmp 0x404a72
cmp esi, 0x8002000a
jne 0x40432c
mov edx, dword [str.DISP_E_OVERFLOW]
mov eax, dword [esp + 0x84]
mov dword [eax], edx
mov ecx, dword [0x574a08]
mov dword [eax + 4], ecx
mov edx, dword [0x574a0c]
mov dword [eax + 8], edx
mov ecx, dword [str._saliases.ini]
mov dword [eax + 0xc], ecx
jmp 0x404a72
cmp esi, 0x80020004
jne 0x40434d
mov edi, dword [esp + 0x84]
mov ecx, 5
mov esi, str.DISP_E_PARAMNOTFOUND
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jmp 0x404a72
cmp esi, 0x80020005
jne 0x40436d
mov edi, dword [esp + 0x84]
mov ecx, 5
mov esi, str.DISP_E_TYPEMISMATCH
rep movsd dword es:[edi], dword [esi]
jmp 0x404a72
cmp esi, 0x80020001
jne 0x40438d
mov edi, dword [esp + 0x84]
mov ecx, 6
mov esi, str.DISP_E_UNKNOWNINTERFACE
rep movsd dword es:[edi], dword [esi]
jmp 0x404a72
cmp esi, 0x8002000c
jne 0x4043d8
mov edx, dword [str.DISP_E_UNKNOWNLCID]
mov eax, dword [esp + 0x84]
mov dword [eax], edx
mov ecx, dword [0x5749a8]
mov dword [eax + 4], ecx
mov edx, dword [0x5749ac]
mov dword [eax + 8], edx
mov ecx, dword [0x5749b0]
mov dword [eax + 0xc], ecx
mov dx, word [0x5749b4]
mov word [eax + 0x10], dx
mov cl, byte [0x5749b6]
mov byte [eax + 0x12], cl
jmp 0x404a72
cmp esi, 0x8002000f
jne 0x4043f8
mov edi, dword [esp + 0x84]
mov ecx, 6
mov esi, str.DISP_E_PARAMNOTOPTIONAL
rep movsd dword es:[edi], dword [esi]
jmp 0x404a72
cmp esi, 0x80020006
jne 0x404443
mov edx, dword [str.DISP_E_UNKNOWNNAME]
mov eax, dword [esp + 0x84]
mov dword [eax], edx
mov ecx, dword [0x574978]
mov dword [eax + 4], ecx
mov edx, dword [0x57497c]
mov dword [eax + 8], edx
mov ecx, dword [0x574980]
mov dword [eax + 0xc], ecx
mov dx, word [0x574984]
mov word [eax + 0x10], dx
mov cl, byte [0x574986]
mov byte [eax + 0x12], cl
jmp 0x404a72
cmp esi, 0x80020011
jne 0x404a72
mov edi, dword [esp + 0x84]
mov ecx, 5
mov esi, str.DISP_E_NOTACOLLECTION
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x404a72
push str..argerr
push edi
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x40449d
mov edx, dword [esi + 0x168]
mov eax, dword [esp + 0x84]
push edx
push 0x5748f8
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
jmp 0x404a72
push str..dispatch
push edi
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x4044f9
mov eax, dword [esi + 0x12c]
test eax, eax
mov eax, dword [esp + 0x84]
je 0x4044d8
mov ecx, dword [str._true]
mov dword [eax], ecx
mov dx, word [0x5748d4]
mov word [eax + 4], dx
jmp 0x404a72
mov ecx, dword [str._false]
mov dword [eax], ecx
mov dx, word [0x5748c4]
mov word [eax + 4], dx
mov cl, byte [0x5748c6]
mov byte [eax + 6], cl
jmp 0x404a72
push str..unknown
push edi
call fcn.00572b46
add esp, 8
test eax, eax
jne 0x404a72
mov eax, dword [esi + 0x130]
test eax, eax
mov eax, dword [esp + 0x84]
je 0x404538
mov edx, dword [str._true]
mov dword [eax], edx
mov cx, word [0x5748d4]
mov word [eax + 4], cx
jmp 0x404a72
mov edx, dword [str._false]
mov dword [eax], edx
mov cx, word [0x5748c4]
mov word [eax + 4], cx
mov dl, byte [0x5748c6]
mov byte [eax + 6], dl
jmp 0x404a72
mov edx, dword [esp + 0x84]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x404564
jmp 0x404a72
cmp eax, 2
jne 0x404a72
mov esi, dword [esi + 0x1e0]
test esi, esi
je 0x404a72
mov edi, dword [esp + 0x80]
mov eax, dword [edi + 0x40]
mov ecx, dword [eax + 0x40]
mov edx, dword [ecx]
push edx
push esi
call fcn.00572b46
add esp, 8
test eax, eax
je 0x4045b6
mov esi, dword [esi + 0x84]
test esi, esi
jne 0x404591
jmp 0x404a72
test esi, esi
je 0x404a72
add esi, 0x68
mov ecx, dword [esi]
mov edx, dword [esi + 4]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esi + 8]
mov dword [eax + 4], edx
mov edx, dword [esi + 0xc]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x94]
mov dword [eax + 0xc], edx
call fcn.00402ad0
jmp 0x404a72
mov edx, dword [eax]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4045f4
sub eax, esi
cmp eax, 0x5a
jbe 0x404605
mov byte [edx + 0x5a], cl
mov ecx, dword [ebx + 0x40]
mov edx, dword [ecx + 0x40]
mov edx, dword [edx]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404612
sub eax, esi
cmp eax, 0x5a
jbe 0x404623
mov byte [edx + 0x5a], cl
mov esi, dword [0x58d000]
test esi, esi
je 0x40464d
lea ecx, [ecx]
mov eax, dword [ebx + 0x40]
mov ecx, dword [eax]
push ecx
push esi
call fcn.00572b46
add esp, 8
test eax, eax
je 0x40467a
mov esi, dword [esi + 0x1e4]
test esi, esi
jne 0x404630
mov edx, dword [ebx + 0x40]
mov eax, dword [edx]
push eax
xor edx, edx
mov ecx, 0x1a8
call fcn.0041c9e0
push eax
push 0x595d60
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x18
test esi, esi
je 0x40464d
mov eax, dword [esi + 0x12c]
test eax, eax
je 0x40464d
cmp dword [esp + 0x90], edi
jne 0x4046ba
mov edi, dword [esp + 0x80]
mov edx, dword [edi + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax]
push ecx
lea ecx, [esi + 0x178]
mov edx, 0x64
call fcn.0041e120
mov ebp, dword [edi + 8]
mov ebx, dword [edi + 0x40]
dec ebp
jmp 0x4046d4
lea ecx, [esi + 0x178]
mov edx, 0x64
call fcn.0041e210
mov ebx, dword [esp + 0x80]
mov ebp, dword [ebx + 8]
lea edx, [esi + 0x138]
push edx
mov word [esi + 0x134], 0
call dword [sym.imp.OLEAUT32.dll_VariantClear]
xor eax, eax
mov ecx, 8
lea edi, [esi + 0x148]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x94]
mov dword [esi + 0x168], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 0x16c], 0x80004005
mov dword [esi + 0x170], eax
mov dword [esi + 0x174], ecx
mov edx, dword [ebx + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax]
lea edx, [esi + 0xc8]
mov edi, edi
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x404730
mov ecx, dword [ebx + 0x40]
mov edx, dword [ecx + 0x40]
mov eax, dword [edx + 0x40]
mov ecx, dword [eax]
push ecx
call fcn.00563a6c
add esp, 4
test al, 1
je 0x404759
or byte [esi + 0x134], 1
test al, 2
je 0x404764
or byte [esi + 0x134], 2
test al, 4
je 0x40476f
or byte [esi + 0x134], 4
test al, 8
je 0x40477a
or byte [esi + 0x134], 8
xor edi, edi
cmp word [esi + 0x134], di
je 0x40493c
mov dword [0x58d004], edi
cmp dword [esi + 0x1e0], edi
je 0x4047b5
jmp 0x4047a0
mov edx, dword [esi + 0x1e0]
mov ecx, esi
call fcn.00402230
cmp dword [esi + 0x1e0], edi
jne 0x4047a0
cmp ebp, 4
mov dword [esi + 0x1e0], edi
jl 0x40495b
mov byte [esp + 0x18], 0
mov edx, dword [ebx + 0x40]
mov ecx, dword [edx + 0x40]
mov edx, dword [ecx + 0x40]
mov ebx, dword [edx + 0x40]
xor ebp, ebp
xor eax, eax
cmp ebx, ebp
mov dword [esp + 0x10], 4
mov dword [esp + 0x94], ebp
mov dword [esp + 0x88], ebp
mov edi, 1
je 0x40495d
lea esp, [esp]
cmp eax, ebp
jne 0x4048bc
lea eax, [esp + 0x18]
mov byte [esp + 0x18], 0
mov ecx, dword [ebx]
push eax
lea edx, [esp + 0x8c]
mov dword [esp + 0x98], ebp
mov dword [esp + 0x8c], ebp
call fcn.004022b0
mov edi, eax
cmp di, 1
je 0x40493c
cmp di, 0xc
jne 0x4048b5
mov ecx, dword [ebx]
mov eax, 1
push 0x20
push ecx
mov dword [esp + 0x9c], eax
mov dword [esp + 0x90], eax
call fcn.00563730
add esp, 8
cmp eax, ebp
je 0x40493c
cmp byte [eax], 0x20
jne 0x404879
lea ecx, [ecx]
mov cl, byte [eax + 1]
inc eax
cmp cl, 0x20
je 0x404870
cmp byte [eax], 0
je 0x40493c
mov edx, dword [esp + 0x8c]
sub edx, eax
jmp 0x404890
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x404890
mov ecx, dword [esp + 0x8c]
push ebp
xor edx, edx
call fcn.004022b0
mov edi, eax
cmp di, 1
je 0x40493c
mov eax, 1
jmp 0x404917
cmp eax, 1
jne 0x404917
mov ecx, esi
call fcn.004021b0
cmp eax, ebp
je 0x404a3d
mov ebp, eax
lea edx, [esp + 0x18]
lea ecx, [esp + 0x18]
sub ebp, edx
lea esp, [esp]
mov dl, byte [ecx]
mov byte [ecx + ebp], dl
inc ecx
test dl, dl
jne 0x4048e0
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x88]
mov dword [eax + 0x78], ecx
mov dword [eax + 0x7c], edx
mov ecx, dword [ebx]
push ecx
lea ecx, [eax + 0x68]
mov edx, edi
call fcn.004026d0
test eax, eax
je 0x404a3d
xor eax, eax
xor ebp, ebp
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x80]
inc ecx
cmp ecx, dword [edx + 8]
mov dword [esp + 0x10], ecx
jg 0x404937
mov ebx, dword [ebx + 0x40]
cmp ebx, ebp
jne 0x404800
cmp ecx, 1
jne 0x40495d
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x80]
push 6
call fcn.004764c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x18
xor ebp, ebp
cmp dword [esp + 0x90], 1
jne 0x4049f5
push ebp
push ebp
push 1
push ebp
call dword [sym.imp.KERNEL32.dll_CreateEventA]
cmp eax, ebp
mov dword [esi + 0x1dc], eax
je 0x4049c2
lea eax, [esp + 0x8c]
push eax
push ebp
push esi
push 0x403960
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebp
je 0x4049c2
mov eax, dword [esi + 0x1dc]
cmp eax, ebp
je 0x4049c2
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x84]
mov word [ecx], 0x31
mov dword [0x58d004], ebp
jmp 0x4049d8
mov edx, dword [esp + 0x84]
mov word [edx], 0x30
mov dword [0x58d004], 1
mov eax, dword [esi + 0x1dc]
cmp eax, ebp
je 0x404a72
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x1dc], ebp
jmp 0x404a72
mov ecx, esi
call fcn.004033f0
mov ecx, esi
mov edx, eax
call fcn.00403050
test eax, eax
je 0x404a72
cmp edx, ebp
mov dword [esi + 0x16c], edx
jl 0x404a5c
mov eax, dword [esp + 0x84]
mov word [eax], 0x31
mov dword [0x58d004], ebp
call fcn.00403170
cmp eax, 1
je 0x404a72
cmp eax, 6
je 0x40493c
cmp eax, 8
jne 0x404a72
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x80]
push 8
call fcn.004764c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret 0x18
mov ecx, dword [esp + 0x84]
mov word [ecx], 0x30
mov dword [0x58d004], 1
mov esi, dword [esp + 0x80]
mov eax, dword [esi + 8]
test eax, eax
jle 0x404a9d
mov edi, dword [esp + 0x14]
mov edx, dword [esi + 0x40]
mov ecx, dword [edi]
call fcn.004c2730
mov dword [edi], eax
mov ecx, dword [esi + 8]
dec ecx
mov eax, ecx
test eax, eax
mov dword [esi + 8], ecx
jg 0x404a84
mov dword [esi + 8], 0
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x6c
ret 0x18