Function at 0x40e8b0
Capabilities:
Encode data using xor
Extract resource via kernel32 functions
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a0825
mov eax, dword fs:[0]
push eax
sub esp, 0x604
mov eax, dword [0x4d3040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x500], ebx
mov ecx, dword [ebx + 0x38]
test ecx, ecx
je 0x40f6f9
cmp dword [ebx + 0x44], 0
je 0x40f6f9
call fcn.0041e502
mov edx, dword [ebx + 0x40]
mov esi, edx
mov ecx, dword [edx + 4]
cmp byte [ecx + 0xd], 0
jne 0x40e924
nop
cmp dword [ecx + 0x10], eax
jge 0x40e91a
mov ecx, dword [ecx + 8]
jmp 0x40e91e
mov esi, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x40e910
cmp byte [esi + 0xd], 0
jne 0x40e933
cmp eax, dword [esi + 0x10]
jl 0x40e933
cmp esi, edx
jne 0x40e935
mov esi, dword [edx]
push 0x4ac5ec
push 0x6c
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
mov dword [ebp - 0x508], ebx
test ebx, ebx
je 0x40f6f9
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40f6ed
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push ebx
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
push 3
mov edx, eax
mov ecx, edi
call fcn.00413a5f
mov ecx, dword [esi + 0x14]
mov edi, eax
add esp, 8
mov dword [ebp - 0x4f0], edi
test edi, edi
jne 0x40e9a6
mov esi, dword [ebp - 0x504]
mov eax, 0x10000
jmp 0x40eccc
cmp dword [edi], 1
je 0x40e9bb
mov esi, dword [ebp - 0x504]
mov eax, 0x80000
jmp 0x40eccc
mov esi, dword [edi + 4]
lea eax, [ebp - 0x220]
push 0
push 0
push 0x104
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0xfde9
mov dword [ebp - 0x4e8], esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, dword [esi]
test esi, esi
je 0x40eca8
lea ecx, [ebp - 0x220]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e9f7
sub ecx, edx
cmp ecx, 0x100
jae 0x40eca8
cmp dword [esi + 0x18], 0
je 0x40eca8
mov eax, dword [esi + 0x10]
lea edx, [esi + 0x28]
sub esp, 0x10
mov dword [ebp - 0x4ec], eax
mov eax, dword [esi + 0x14]
mov ecx, esi
mov dword [ebp - 0x4e4], eax
mov eax, dword [esi + 0x24]
push 0
mov dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push eax
mov dword [esi + 0x10], 0
call fcn.00412512
xor ecx, ecx
mov edx, eax
add esp, 0x1c
test edx, edx
sete cl
mov dword [esi + 0x18], ecx
test edx, edx
jne 0x40eb26
sub esp, 0x10
lea eax, [ebp - 0x118]
xor edx, edx
mov ecx, esi
push 0x100
push eax
push 0
call fcn.00412512
add esp, 0x1c
xor edi, edi
mov dl, byte [ebp + edi - 0x118]
lea edi, [edi + 1]
mov bl, byte [ebp + edi - 0x221]
mov al, dl
sub al, 0x20
movzx eax, al
mov dword [ebp - 0x4f8], eax
lea ecx, [edx - 0x61]
cmp cl, 0x19
movzx eax, dl
mov ecx, dword [ebp - 0x4f8]
cmova ecx, eax
mov al, bl
sub al, 0x61
cmp al, 0x19
ja 0x40eabb
add bl, 0xe0
test cl, cl
je 0x40eacb
test bl, bl
je 0x40eacf
cmp cl, bl
jl 0x40eacf
jle 0x40ea80
jmp 0x40eacf
test bl, bl
je 0x40eb40
cmp dword [esi + 0x18], 0
je 0x40ec96
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x40ec8c
mov ecx, dword [esi + 0x50]
sub esp, 0x10
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea edx, [esi + 0x28]
push 0
lea eax, [esi + 0x78]
mov ecx, esi
push 0
push eax
call fcn.00412512
mov edx, eax
add esp, 0x1c
xor eax, eax
test edx, edx
sete al
mov dword [esi + 0x18], eax
test edx, edx
je 0x40ea61
mov eax, dword [ebp - 0x4ec]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x4e4]
mov dword [esi + 0x14], eax
test edx, edx
jne 0x40eca8
mov edi, dword [ebp - 0x4e8]
cmp dword [edi + 4], 0xffffffff
je 0x40ec6f
mov eax, dword [edi]
mov dword [ebp - 0x4f8], eax
test eax, eax
je 0x40ec6f
mov ebx, dword [eax + 0x7c]
test ebx, ebx
je 0x40ec6f
mov eax, dword [ebx]
test eax, eax
je 0x40eb7a
push eax
call fcn.004886fc
add esp, 4
cmp dword [ebx + 0x40], 0
mov dword [ebx], 0
je 0x40ec52
lea esi, [ebx + 4]
test esi, esi
je 0x40ec52
mov edi, dword [esi + 0x1c]
test edi, edi
je 0x40ec4c
mov eax, dword [esi + 0x24]
test eax, eax
je 0x40ec4c
mov edi, dword [edi + 0x14]
test edi, edi
je 0x40ec37
mov ecx, dword [edi]
cmp ecx, 4
je 0x40ebc2
cmp ecx, 5
jne 0x40ebd0
push dword [edi + 0xc]
push dword [esi + 0x28]
call eax
mov eax, dword [esi + 0x24]
add esp, 8
cmp dword [edi], 6
jne 0x40ebe0
push dword [edi + 4]
push dword [esi + 0x28]
call eax
add esp, 8
mov eax, dword [edi + 0x28]
mov dword [edi + 0x34], eax
mov dword [edi + 0x30], eax
mov eax, dword [edi + 0x38]
mov dword [edi], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
test eax, eax
je 0x40ec15
push 0
push 0
push 0
call eax
mov dword [edi + 0x3c], eax
add esp, 0xc
mov dword [esi + 0x30], eax
push dword [edi + 0x28]
mov eax, dword [esi + 0x24]
push dword [esi + 0x28]
call eax
push dword [edi + 0x24]
mov eax, dword [esi + 0x24]
push dword [esi + 0x28]
call eax
mov eax, dword [esi + 0x24]
push edi
push dword [esi + 0x28]
call eax
add esp, 0x18
push dword [esi + 0x1c]
mov eax, dword [esi + 0x24]
push dword [esi + 0x28]
call eax
add esp, 8
mov dword [esi + 0x1c], 0
mov edi, dword [ebp - 0x4e8]
push ebx
mov dword [ebx + 0x40], 0
call fcn.004886fc
mov eax, dword [ebp - 0x4f8]
add esp, 4
mov dword [eax + 0x7c], 0
mov eax, dword [edi]
mov ecx, edi
mov dword [edi + 4], 0xffffffff
mov esi, dword [eax + 0x10]
lea eax, [ebp - 0x4e0]
push eax
push esi
call fcn.00412f9e
jmp 0x40ecc6
mov edx, 0xffffff9c
jmp 0x40eb26
mov eax, dword [ebp - 0x4ec]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x4e4]
mov dword [esi + 0x14], eax
push 0x230
lea eax, [ebp - 0x4e0]
or esi, 0xffffffff
push 0
push eax
call fcn.00484a20
add esp, 0xc
mov eax, 0x500
mov edi, dword [ebp - 0x4f0]
mov dword [0x4d67ec], eax
cmp esi, 0xffffffff
je 0x40f6ed
mov ebx, dword [ebp - 0x2b4]
push ebx
call fcn.004827b9
add esp, 4
mov dword [ebp - 0x4f8], eax
test edi, edi
jne 0x40ecfa
mov eax, 0x10000
jmp 0x40ed13
cmp dword [edi], 1
je 0x40ed06
mov eax, 0x80000
jmp 0x40ed13
mov ecx, dword [edi + 4]
push 3
push ebx
push eax
push esi
call fcn.00413686
mov dword [0x4d67ec], eax
cmp ebx, 1
jae 0x40ed32
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x4e4], ebx
mov dword [ebp - 0x4e8], edi
jmp 0x40ef33
xor eax, eax
nop dword [eax]
nop dword [eax + eax]
mov byte [ebp + eax - 0x610], al
inc eax
cmp eax, 0x100
jb 0x40ed40
xor ecx, ecx
xor edx, edx
nop dword [eax]
nop word [eax + eax]
mov al, byte [ecx + 0x4acc94]
inc ecx
mov byte [ebp + edx - 0x118], al
xor eax, eax
inc edx
cmp ecx, 2
cmovl eax, ecx
mov ecx, eax
cmp edx, 0x100
jb 0x40ed60
xor edi, edi
xor esi, esi
nop word [eax + eax]
mov dl, byte [ebp + esi - 0x610]
movzx eax, byte [ebp + esi - 0x118]
add eax, edi
movzx ecx, dl
add ecx, eax
movzx edi, cl
mov al, byte [ebp + edi - 0x610]
mov byte [ebp + esi - 0x610], al
inc esi
mov byte [ebp + edi - 0x610], dl
cmp esi, 0x100
jb 0x40ed90
lea esi, [ebx + 1]
mov dword [ebp - 0x4e8], 0
push esi
mov dword [ebp - 0x4ec], 0
call fcn.004827b9
add esp, 4
mov edi, eax
mov dword [ebp - 0x4e4], edi
push esi
push 0
push edi
call fcn.00484a20
add esp, 0xc
test ebx, ebx
je 0x40ee8a
mov esi, edi
mov edi, dword [ebp - 0x4f8]
sub edi, esi
mov dword [ebp - 0x4f0], edi
mov eax, dword [ebp - 0x4e8]
lea esi, [esi + 1]
inc eax
movzx eax, al
mov dword [ebp - 0x4e8], eax
mov edi, dword [ebp - 0x4e8]
mov cl, byte [ebp + eax - 0x610]
mov eax, dword [ebp - 0x4ec]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [ebp - 0x4ec], eax
mov al, byte [ebp + eax - 0x610]
mov byte [ebp + edi - 0x610], al
mov eax, dword [ebp - 0x4ec]
mov byte [ebp + eax - 0x610], cl
mov eax, edi
mov edi, dword [ebp - 0x4f0]
movzx eax, byte [ebp + eax - 0x610]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x610]
xor al, byte [edi + esi - 1]
mov byte [esi - 1], al
sub ebx, 1
jne 0x40ee13
mov ebx, dword [ebp - 0x4e4]
test ebx, ebx
jne 0x40eea1
xor edi, edi
mov dword [ebp - 0x4e8], edi
jmp 0x40ef33
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call edi
mov esi, eax
test esi, esi
jne 0x40eec7
xor edi, edi
mov dword [ebp - 0x4e8], edi
jmp 0x40ef2d
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004827b9
add esp, 4
mov dword [ebp - 0x4e8], eax
lea ecx, [esi*2 + 2]
push ecx
push 0
push eax
call fcn.00484a20
add esp, 0xc
push esi
mov esi, dword [ebp - 0x4e8]
push esi
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
call edi
test eax, eax
jne 0x40ef27
push esi
call fcn.00482102
add esp, 4
xor edi, edi
mov dword [ebp - 0x4e8], edi
jmp 0x40ef2d
mov edi, dword [ebp - 0x4e8]
mov dword [ebp - 0x4e4], ebx
call fcn.00409f90
mov dword [ebp - 0x4f0], eax
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x2a8], eax
xor eax, eax
mov dword [ebp - 0x2b0], 0
mov word [ebp - 0x2a4], ax
push 0xc8
mov dword [ebp - 4], eax
call fcn.00482304
mov esi, eax
add esp, 4
mov dword [ebp - 0x4f4], esi
lea edx, [esi + 8]
lea eax, [edx + 0x14]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [edx], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
mov dword [eax], 0x1401
mov dword [eax + 0x20], edx
mov dword [eax + 0x24], 0x7fec
mov dword [eax + 0x28], 0
mov dword [eax + 0x2c], 0
mov dword [edx + 4], 0
mov dword [edx + 8], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0xc], 0x7fec
mov dword [esi], eax
mov dword [eax + 0x14], eax
mov ecx, dword [esi]
lea eax, [ecx + 0x20]
neg ecx
sbb ecx, ecx
and ecx, eax
mov dword [edx], ecx
mov dword [ebp - 0x2ac], esi
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x2b0]
cmp word [edi], 0x3c
push edi
jne 0x40f048
call fcn.004260b0
test al, al
jne 0x40f072
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x2ac]
test esi, esi
je 0x40f36c
mov dword [ebp - 4], 2
jmp 0x40f350
call fcn.004261b9
test al, al
jne 0x40f072
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x2ac]
test esi, esi
je 0x40f36c
mov dword [ebp - 4], 3
jmp 0x40f350
mov eax, dword [ebp - 0x2b0]
mov dword [ebp - 0x4f4], eax
lea eax, [ebp - 0x50c]
push ecx
push eax
lea ecx, [ebp - 0x4f4]
call fcn.0044c467
mov eax, dword [eax]
test eax, eax
jne 0x40f0b8
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x2ac]
test esi, esi
je 0x40f36c
mov dword [ebp - 4], 4
jmp 0x40f350
mov esi, dword [eax + 0x10]
test esi, esi
je 0x40f338
mov eax, dword [esi + 4]
test eax, eax
jne 0x40f0d5
mov eax, 0x4ac55c
mov dword [ebp - 0x4e4], ebx
push str.Text
push eax
call fcn.0048d783
add esp, 8
test eax, eax
jne 0x40f321
test esi, esi
jne 0x40f0fc
xor edi, edi
mov dword [ebp - 0x4e4], ebx
jmp 0x40f1a9
mov ebx, dword [esi + 0x1c]
test ebx, ebx
je 0x40f146
mov eax, dword [ebx + 4]
test eax, eax
je 0x40f13f
mov ecx, 0x4ad878
nop
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40f136
test dx, dx
je 0x40f132
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40f136
add ecx, 4
add eax, 4
test dx, dx
jne 0x40f110
xor eax, eax
jmp 0x40f13b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f148
mov ebx, dword [ebx + 0x10]
test ebx, ebx
jne 0x40f103
xor ebx, ebx
mov edi, dword [esi + 0x1c]
test edi, edi
je 0x40f196
nop
mov eax, dword [edi + 4]
test eax, eax
je 0x40f18f
mov ecx, str.value
nop dword [eax]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40f186
test dx, dx
je 0x40f182
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40f186
add ecx, 4
add eax, 4
test dx, dx
jne 0x40f160
xor eax, eax
jmp 0x40f18b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f198
mov edi, dword [edi + 0x10]
test edi, edi
jne 0x40f150
xor edi, edi
test ebx, ebx
je 0x40f1a9
mov eax, dword [ebx + 8]
mov dword [ebp - 0x4f4], eax
test eax, eax
jne 0x40f1b4
mov eax, 0x4ac55c
mov dword [ebp - 0x4f4], eax
test edi, edi
je 0x40f1c5
mov edi, dword [edi + 8]
mov dword [ebp - 0x4ec], edi
test edi, edi
jne 0x40f1d0
mov edi, 0x4ac55c
mov dword [ebp - 0x4ec], edi
test eax, eax
je 0x40f321
test edi, edi
je 0x40f321
mov ecx, dword [ebp - 0x4f0]
push 1
push eax
call fcn.004278e0
mov ebx, eax
test ebx, ebx
je 0x40f294
lea ecx, [edi + 2]
nop dword [eax + eax]
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x40f200
mov edx, dword [ebx]
sub edi, ecx
sar edi, 1
cmp edi, 0x3f
jge 0x40f22b
lea eax, [ebx + 4]
cmp edx, eax
je 0x40f277
push edx
call fcn.004886fc
add esp, 4
lea edx, [ebx + 4]
jmp 0x40f275
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x4f4], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f236
sub ecx, dword [ebp - 0x4f4]
lea eax, [ebx + 4]
sar ecx, 1
cmp edi, ecx
jg 0x40f256
cmp edx, eax
jne 0x40f277
jmp 0x40f25a
cmp edx, eax
jne 0x40f262
mov dword [ebx], 0
xor edx, edx
lea eax, [edi*2 + 2]
push eax
push edx
call fcn.0048ff58
add esp, 8
mov edx, eax
mov dword [ebx], edx
push edi
push dword [ebp - 0x4ec]
push edx
call fcn.0048df2f
mov eax, dword [ebx]
add esp, 0xc
xor ecx, ecx
mov word [eax + edi*2], cx
jmp 0x40f321
push 0x84
call fcn.00482304
mov ebx, eax
lea edx, [edi + 2]
lea ecx, [ebx + 4]
mov dword [ebp - 0x4fc], ebx
add esp, 4
xor eax, eax
mov dword [ebx], ecx
mov word [ecx], ax
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x40f2b6
sub edi, edx
sar edi, 1
cmp edi, 0x3f
jl 0x40f2f7
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f2d0
lea eax, [edi*2 + 2]
mov dword [ebx], 0
push eax
push 0
call fcn.0048ff58
mov ecx, eax
add esp, 8
mov dword [ebx], ecx
push edi
push dword [ebp - 0x4ec]
push ecx
call fcn.0048df2f
mov eax, dword [ebx]
add esp, 0xc
xor ecx, ecx
push ebx
push dword [ebp - 0x4f4]
mov word [eax + edi*2], cx
mov ecx, dword [ebp - 0x4f0]
call fcn.00427995
test esi, esi
je 0x40f338
mov eax, dword [esi + 0x18]
mov esi, eax
mov ebx, dword [ebp - 0x4e4]
test eax, eax
jne 0x40f0c3
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x2ac]
test esi, esi
je 0x40f36c
mov dword [ebp - 4], 5
mov ecx, esi
call fcn.00425f74
push 0xc8
push esi
mov dword [ebp - 4], 0xffffffff
call fcn.00482334
add esp, 8
mov eax, dword [ebp - 0x2a8]
lea ecx, [ebp - 0x2a4]
cmp eax, ecx
je 0x40f385
push eax
call fcn.004886fc
add esp, 4
call fcn.00409f90
mov ebx, eax
push 1
push 0x4acc1c
mov ecx, ebx
call fcn.004278e0
mov edi, eax
test edi, edi
jne 0x40f463
cmp dword [ebx + 0x10], eax
je 0x40f4b1
push 0x84
call fcn.00482304
mov edi, eax
add esp, 4
mov dword [ebp - 0x4fc], edi
mov dword [ebp - 4], 6
mov ecx, dword [ebx + 0x10]
push 0
push 0x4acc1c
mov eax, dword [ecx]
call dword [eax]
xor edx, edx
lea ecx, [edi + 4]
mov dword [edi], ecx
test eax, eax
mov word [ecx], dx
mov edx, 0x4ac55c
cmovne edx, eax
mov esi, edx
mov dword [ebp - 0x4f0], edx
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40f3f6
sub esi, edx
sar esi, 1
cmp esi, 0x3f
jl 0x40f437
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f410
lea eax, [esi*2 + 2]
mov dword [edi], 0
push eax
push 0
call fcn.0048ff58
mov ecx, eax
add esp, 8
mov dword [edi], ecx
push esi
push dword [ebp - 0x4f0]
push ecx
call fcn.0048df2f
mov eax, dword [edi]
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 4], 0xffffffff
push edi
mov word [eax + esi*2], cx
mov ecx, ebx
push 0x4acc1c
call fcn.00427995
mov eax, dword [edi]
mov dword [ebp - 0x4ec], eax
mov esi, dword [ebp - 0x500]
mov esi, dword [esi + 0x38]
cmp dword [esi + 0xa38], 0
jbe 0x40f58b
mov esi, dword [esi + 0xa34]
xor edx, edx
mov eax, dword [esi]
cmp eax, esi
je 0x40f58b
mov edi, dword [eax + 8]
cmp byte [edi + 0x88], 0
jne 0x40f4a4
test edx, edx
je 0x40f4be
inc edx
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, esi
jne 0x40f493
jmp 0x40f58b
mov ecx, 0x4acc1c
mov dword [ebp - 0x4ec], ecx
jmp 0x40f46b
mov ecx, dword [ebp - 0x4ec]
test ecx, ecx
je 0x40f566
mov esi, ecx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40f4d1
mov edx, dword [edi]
sub esi, ecx
sar esi, 1
cmp esi, 0x3f
jge 0x40f4fd
lea ebx, [edi + 4]
cmp edx, ebx
je 0x40f53f
push edx
call fcn.004886fc
add esp, 4
mov dword [edi], ebx
mov edx, ebx
jmp 0x40f53f
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f502
sub ecx, ebx
lea eax, [edi + 4]
sar ecx, 1
cmp esi, ecx
jg 0x40f51e
cmp edx, eax
jne 0x40f53f
jmp 0x40f522
cmp edx, eax
jne 0x40f52a
mov dword [edi], 0
xor edx, edx
lea eax, [esi*2 + 2]
push eax
push edx
call fcn.0048ff58
mov edx, eax
add esp, 8
mov dword [edi], edx
mov eax, dword [ebp - 0x4ec]
push esi
push eax
push edx
call fcn.0048df2f
mov eax, dword [edi]
add esp, 0xc
xor ecx, ecx
mov word [eax + esi*2], cx
mov ecx, dword [ebp - 0x4e4]
mov dword [ebp - 0x4e4], ecx
jmp 0x40f58b
mov eax, dword [edi]
lea esi, [edi + 4]
cmp eax, esi
je 0x40f578
push eax
call fcn.004886fc
add esp, 4
xor eax, eax
mov dword [edi], esi
mov word [esi], ax
mov eax, dword [ebp - 0x4e4]
mov dword [ebp - 0x4e4], eax
mov esi, dword [ebp - 0x500]
mov eax, dword [esi + 0x38]
cmp dword [eax + 0x6ec], 0
jne 0x40f68a
call fcn.00409f90
mov ebx, eax
push 1
push 0x4acc1c
mov ecx, ebx
call fcn.004278e0
mov edi, eax
test edi, edi
jne 0x40f67f
cmp dword [ebx + 0x10], eax
je 0x40f715
push 0x84
call fcn.00482304
mov edi, eax
add esp, 4
mov dword [ebp - 0x4fc], edi
mov dword [ebp - 4], 7
mov ecx, dword [ebx + 0x10]
push 0
push 0x4acc1c
mov eax, dword [ecx]
call dword [eax]
xor edx, edx
lea ecx, [edi + 4]
mov dword [edi], ecx
test eax, eax
mov word [ecx], dx
mov edx, 0x4ac55c
cmovne edx, eax
mov esi, edx
mov dword [ebp - 0x4f0], edx
lea edx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40f612
sub esi, edx
sar esi, 1
cmp esi, 0x3f
jl 0x40f64d
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f626
lea eax, [esi*2 + 2]
mov dword [edi], 0
push eax
push 0
call fcn.0048ff58
mov ecx, eax
add esp, 8
mov dword [edi], ecx
push esi
push dword [ebp - 0x4f0]
push ecx
call fcn.0048df2f
mov eax, dword [edi]
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 4], 0xffffffff
push edi
mov word [eax + esi*2], cx
mov ecx, ebx
push 0x4acc1c
call fcn.00427995
mov esi, dword [ebp - 0x500]
mov edx, dword [edi]
mov ecx, dword [esi + 0x38]
push edx
mov eax, dword [ecx]
call dword [eax + 0x50]
mov eax, dword [esi + 0x34]
mov esi, dword [eax + 0x104]
mov ecx, esi
mov eax, dword [esi]
mov eax, dword [eax + 0x170]
call eax
test al, al
je 0x40f6c2
mov ecx, esi
mov byte [esi + 0x1ac], 1
call fcn.0041ff0d
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x40f6c2
mov byte [eax + 0x16d], 1
push dword [ebp - 0x4e4]
call fcn.00482102
mov esi, dword [ebp - 0x4e8]
add esp, 4
push esi
call fcn.00482102
add esp, 4
push dword [ebp - 0x4f8]
call fcn.00482102
add esp, 4
push dword [ebp - 0x508]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004820f4
mov esp, ebp
pop ebp
ret
mov edx, 0x4acc1c
jmp 0x40f681