Function at 0x406c40
Capabilities:
Encode data using xor
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5346e2
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0xadb4
call fcn.00512840
mov eax, dword [0x581e00]
xor eax, esp
mov dword [esp + 0xadb0], eax
push ebx
push esi
push edi
mov eax, dword [0x581e00]
xor eax, esp
push eax
lea eax, [esp + 0xadc8]
mov dword fs:[0], eax
mov eax, 0x58adac
xor edi, edi
xor edx, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406c91
sub eax, esi
je 0x406cba
lea esp, [esp]
mov cl, byte [edx + 0x58adac]
cmp cl, 0x2d
je 0x406cb5
cmp cl, 0x30
je 0x406cb5
movsx ecx, cl
add edi, ecx
inc edx
cmp edx, eax
jb 0x406ca0
push 0x400
lea edx, [esp + 0x5c0]
push 0
push edx
mov dword [esp + 0x20], 0x5000
call fcn.00510790
add esp, 0xc
push 0x5000
lea eax, [esp + 0xdc0]
push 0
push eax
call fcn.00510790
mov al, byte [0x58ae44]
add esp, 0xc
test al, 9
jne 0x406d0e
cmp dword [0x58ae50], 0
jne 0x406d0a
test al, 2
je 0x406d0a
mov al, 0x32
jmp 0x406d10
mov al, 0x33
jmp 0x406d10
mov al, 0x31
movsx ecx, al
push edi
push ecx
lea edx, [esp + 0x9c4]
push str.actgetkuntype_cno_d
push edx
call fcn.0050cc59
lea eax, [esp + 0x9cc]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406d34
sub eax, edx
push eax
lea eax, [esp + 0x1c0]
lea ecx, [esp + 0x9c0]
call fcn.00406160
lea eax, [esp + 0x1c0]
add esp, 4
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406d60
sub eax, edx
lea ecx, [eax + eax*2 + 0xe]
cmp ecx, 0x400
jge 0x406d83
push ecx
push eax
lea esi, [esp + 0x1c4]
call fcn.00406b60
lea eax, [esp + 0x1bc]
push eax
push 0x583294
lea ecx, [esp + 0x5c4]
push str._s_s
push ecx
call fcn.0050cc59
xor edi, edi
add esp, 0x10
xor eax, eax
mov dword [esp + 0x24], edi
mov dword [esp + 0xf4], 0xf711e77
mov dword [esp + 0xf8], 0x7076823
mov word [esp + 0xfc], 0x3001
mov byte [esp + 0xfe], 0xc7
mov dword [esp + 0xff], eax
mov dword [esp + 0x103], eax
mov dword [esp + 0x107], eax
mov dword [esp + 0x10b], eax
mov dword [esp + 0x10f], eax
mov dword [esp + 0x113], eax
mov dword [esp + 0x117], eax
mov dword [esp + 0x11b], 0x711e7700
mov word [esp + 0x11f], 0xc70f
mov dword [esp + 0x121], eax
mov dword [esp + 0x125], eax
mov dword [esp + 0x129], eax
mov dword [esp + 0x12d], eax
mov dword [esp + 0x131], eax
mov dword [esp + 0x135], eax
mov dword [esp + 0x139], eax
mov dword [esp + 0x13d], eax
mov word [esp + 0x141], ax
mov byte [esp + 0x143], al
lea ecx, [esp + 0xf4]
lea edx, [edi + 2]
lea esp, [esp]
xor byte [ecx], 0xc7
mov eax, ecx
je 0x406e7d
inc eax
xor byte [eax], 0xc7
jne 0x406e77
add ecx, 0x28
dec edx
jne 0x406e70
xor eax, eax
lea edx, [esp + 0xdbc]
mov dword [esp + 0x148], eax
mov dword [esp + 0x14c], eax
mov dword [esp + 0x150], eax
mov dword [esp + 0x20], eax
push edx
lea ebx, [esp + 0x18]
lea eax, [esp + 0x5c0]
call fcn.004068b0
add esp, 4
test eax, eax
jne 0x407897
mov edx, dword [esp + 0x14]
lea edi, [edx - 7]
shr edi, 1
xor ebx, ebx
xor esi, esi
cmp edi, ebx
jle 0x406f02
lea eax, [esp + edx + 0xdb9]
lea esp, [esp]
movzx ecx, byte [eax]
xor byte [esp + esi + 0xdc1], cl
mov cl, byte [esp + esi + 0xdc1]
xor byte [eax], cl
mov cl, byte [eax]
xor byte [esp + esi + 0xdc1], cl
inc esi
dec eax
cmp esi, edi
jl 0x406ee0
add edx, 0xfffffffb
push edx
lea edx, [esp + 0xdc5]
push edx
lea eax, [esp + 0x5dc4]
call fcn.004062a0
push 8
mov esi, eax
mov dword [esp + 0x80], ebx
call fcn.0040e8d1
add esp, 0xc
cmp eax, ebx
je 0x407a26
mov dword [esp + 0x74], eax
mov dword [eax + 4], ebx
xor ecx, ecx
mov dword [eax], ecx
mov ecx, dword [esp + 0x74]
lea eax, [esp + 0x74]
mov dword [ecx], eax
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0xadd0], ebx
push 8
mov dword [esp + 0x90], ebx
call fcn.0040e8d1
add esp, 4
cmp eax, ebx
je 0x4079fd
mov dword [esp + 0x8c], eax
mov dword [eax + 4], ebx
xor ecx, ecx
mov dword [eax], ecx
mov eax, dword [esp + 0x8c]
lea edx, [esp + 0x8c]
mov dword [eax], edx
mov eax, 0xf
mov dword [esp + 0xb8], eax
mov dword [esp + 0xe8], eax
mov eax, 1
mov dword [esp + 0x90], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xb4], ebx
mov byte [esp + 0xa4], bl
mov dword [esp + 0xe4], ebx
mov byte [esp + 0xd4], bl
mov word [esp + 0xf0], ax
mov dword [esp + 0xadd0], eax
mov eax, 0xfffffe00
and dword [esp + 0x3c], eax
mov dword [esp + 0x40], ebx
and dword [esp + 0x54], eax
mov dword [esp + 0x58], ebx
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + esi + 0x5dc0]
lea edx, [esp + 0x5dc0]
lea ebx, [esp + 0x78]
mov byte [esp + 0xadd4], 5
call fcn.00409870
test al, al
jne 0x407160
lea ecx, [esp + 0x4c]
mov byte [esp + 0xadd0], 3
call fcn.0040d2e0
lea ecx, [esp + 0x34]
mov byte [esp + 0xadd0], 1
call fcn.0040d2e0
mov edi, 0x10
cmp dword [esp + 0xe8], edi
jb 0x40707e
mov edx, dword [esp + 0xd4]
push edx
call fcn.0040e900
add esp, 4
xor ebx, ebx
mov esi, 0xf
mov dword [esp + 0xe8], esi
mov dword [esp + 0xe4], ebx
mov byte [esp + 0xd4], bl
cmp dword [esp + 0xb8], edi
jb 0x4070b3
mov eax, dword [esp + 0xa4]
push eax
call fcn.0040e900
add esp, 4
mov dword [esp + 0xb8], esi
lea esi, [esp + 0x8c]
mov dword [esp + 0xb4], ebx
mov byte [esp + 0xa4], bl
call fcn.00408ef0
mov ecx, dword [esp + 0x8c]
push ecx
call fcn.0040e900
mov eax, dword [esp + 0x88]
add esp, 4
mov dword [esp + 0x8c], ebx
cmp eax, ebx
je 0x40710b
dec eax
jne 0x407100
mov dword [esp + 0x80], ebx
cmp eax, ebx
jne 0x4070f6
mov dword [esp + 0x84], eax
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
cmp esi, ebx
jbe 0x407131
dec esi
cmp dword [eax + esi*4], ebx
je 0x40712d
mov edx, dword [eax + esi*4]
push edx
call fcn.0040e900
mov eax, dword [esp + 0x7c]
add esp, 4
cmp esi, ebx
ja 0x407117
cmp eax, ebx
je 0x40713e
push eax
call fcn.0040e900
add esp, 4
mov eax, dword [esp + 0x74]
push eax
mov dword [esp + 0x80], ebx
mov dword [esp + 0x7c], ebx
call fcn.0040e900
add esp, 4
mov eax, 2
jmp 0x407ba3
mov al, byte [esp + 0x3c]
xor ebx, ebx
test al, al
je 0x407299
cmp al, 6
je 0x407299
lea ecx, [esp + 0x4c]
mov byte [esp + 0xadd0], 3
call fcn.0040d2e0
lea ecx, [esp + 0x34]
mov byte [esp + 0xadd0], 1
call fcn.0040d2e0
mov esi, 0x10
cmp dword [esp + 0xe8], esi
jb 0x4071b6
mov ecx, dword [esp + 0xd4]
push ecx
call fcn.0040e900
add esp, 4
mov edi, 0xf
mov dword [esp + 0xe8], edi
mov dword [esp + 0xe4], ebx
mov byte [esp + 0xd4], bl
cmp dword [esp + 0xb8], esi
jb 0x4071e9
mov edx, dword [esp + 0xa4]
push edx
call fcn.0040e900
add esp, 4
lea esi, [esp + 0x8c]
mov dword [esp + 0xb8], edi
mov dword [esp + 0xb4], ebx
mov byte [esp + 0xa4], bl
call fcn.00408ef0
mov eax, dword [esp + 0x8c]
push eax
call fcn.0040e900
mov eax, dword [esp + 0x88]
add esp, 4
mov dword [esp + 0x8c], ebx
cmp eax, ebx
je 0x407241
dec eax
jne 0x407236
mov dword [esp + 0x80], ebx
cmp eax, ebx
jne 0x40722c
mov dword [esp + 0x84], eax
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
cmp esi, ebx
jbe 0x40726a
lea ecx, [ecx]
dec esi
cmp dword [eax + esi*4], ebx
je 0x407266
mov ecx, dword [eax + esi*4]
push ecx
call fcn.0040e900
mov eax, dword [esp + 0x7c]
add esp, 4
cmp esi, ebx
ja 0x407250
cmp eax, ebx
je 0x407277
push eax
call fcn.0040e900
add esp, 4
mov edx, dword [esp + 0x74]
push edx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x7c], ebx
call fcn.0040e900
add esp, 4
mov eax, 3
jmp 0x407ba3
movsx eax, al
cmp eax, 7
ja case.0x4072a1.0
jmp dword [eax*4 + 0x407bc8]
mov eax, dword [esp + 0x34]
cmp dword [eax + 8], ebx
je case.0x4072a1.0
mov eax, dword [eax + 4]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
call fcn.0040e090
mov ecx, dword [esp + 0x20]
mov esi, dword [ecx + 0x14]
inc esi
jmp 0x4072d6
mov edx, dword [esp + 0x34]
mov esi, dword [edx + 8]
jmp 0x4072d6
xor esi, esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x20], esi
cmp esi, ebx
jne 0x407409
lea ecx, [esp + 0x4c]
mov byte [esp + 0xadd0], 3
call fcn.0040d2e0
lea ecx, [esp + 0x34]
mov byte [esp + 0xadd0], 1
call fcn.0040d2e0
mov edi, 0x10
cmp dword [esp + 0xe8], edi
jb 0x407326
mov eax, dword [esp + 0xd4]
push eax
call fcn.0040e900
add esp, 4
mov esi, 0xf
mov dword [esp + 0xe8], esi
mov dword [esp + 0xe4], ebx
mov byte [esp + 0xd4], bl
cmp dword [esp + 0xb8], edi
jb 0x407359
mov ecx, dword [esp + 0xa4]
push ecx
call fcn.0040e900
add esp, 4
mov dword [esp + 0xb8], esi
lea esi, [esp + 0x8c]
mov dword [esp + 0xb4], ebx
mov byte [esp + 0xa4], bl
call fcn.00408ef0
mov edx, dword [esp + 0x8c]
push edx
call fcn.0040e900
mov eax, dword [esp + 0x88]
add esp, 4
mov dword [esp + 0x8c], ebx
cmp eax, ebx
je 0x4073b1
dec eax
jne 0x4073a6
mov dword [esp + 0x80], ebx
cmp eax, ebx
jne 0x40739c
mov dword [esp + 0x84], eax
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
cmp esi, ebx
jbe 0x4073da
lea ecx, [ecx]
dec esi
cmp dword [eax + esi*4], ebx
je 0x4073d6
mov eax, dword [eax + esi*4]
push eax
call fcn.0040e900
mov eax, dword [esp + 0x7c]
add esp, 4
cmp esi, ebx
ja 0x4073c0
cmp eax, ebx
je 0x4073e7
push eax
call fcn.0040e900
add esp, 4
mov ecx, dword [esp + 0x74]
push ecx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x7c], ebx
call fcn.0040e900
add esp, 4
mov eax, 5
jmp 0x407ba3
xor ecx, ecx
mov eax, esi
mov edx, 0xc
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.0040e90b
add esp, 4
cmp eax, ebx
je 0x407452
push 0x407cd0
push 0x407c60
push esi
lea edi, [eax + 4]
push 0xc
push edi
mov dword [eax], esi
call fcn.0050ed14
mov dword [esp + 0x24], edi
jmp 0x407456
mov dword [esp + 0x24], ebx
mov dword [esp + 0x14], ebx
cmp esi, ebx
jle 0x407768
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x14]
add ecx, 4
mov dword [esp + 0x1c], ecx
mov ebx, ecx
push edi
lea edx, [esp + 0x38]
push edx
call fcn.0040d450
push str.name
push eax
call fcn.0040d6b0
mov ecx, dword [eax]
test ecx, ecx
jne 0x407493
xor eax, eax
jmp 0x4074a1
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407498
sub eax, esi
push eax
push ecx
lea ecx, [ebx - 4]
call fcn.004020a0
push edi
lea eax, [esp + 0x38]
push eax
call fcn.0040d450
push str.down
push eax
call fcn.0040d6b0
mov ecx, dword [eax]
test ecx, ecx
jne 0x4074cb
xor eax, eax
jmp 0x4074df
mov eax, ecx
lea edx, [eax + 1]
mov dword [esp + 0x18], edx
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4074d4
sub eax, dword [esp + 0x18]
push eax
push ecx
mov ecx, ebx
call fcn.004020a0
push edi
lea eax, [esp + 0x38]
push eax
call fcn.0040d450
push str.soft_mk
push eax
call fcn.0040d6b0
mov ecx, dword [eax]
test ecx, ecx
jne 0x407508
xor eax, eax
jmp 0x407519
mov eax, ecx
lea edi, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407510
sub eax, edi
push eax
push ecx
lea ecx, [ebx + 4]
call fcn.004020a0
lea ecx, [ebx - 4]
call fcn.00408ba0
mov ecx, eax
call fcn.00408c20
mov ecx, ebx
call fcn.00408ba0
mov ecx, eax
call fcn.00408c20
mov eax, dword [ebx - 4]
push 0x561360
push eax
call fcn.0050e486
add esp, 8
test eax, eax
sete al
test al, al
je 0x407569
push 4
push 0x56136c
lea ecx, [ebx - 4]
call fcn.004020a0
xor eax, eax
jmp 0x407570
mov cl, byte [esp + eax + 0x11c]
mov byte [esp + eax + 0x194], cl
inc eax
test cl, cl
jne 0x407570
mov esi, dword [ebx - 4]
lea ecx, [esp + 0x194]
push ecx
push esi
call fcn.0050e486
add esp, 8
test eax, eax
sete al
test al, al
je 0x407748
mov eax, dword [ebx]
push 0x2e
push eax
call fcn.0050dc06
add esp, 8
test eax, eax
jne 0x4075ba
or edi, 0xffffffff
jmp 0x4075be
sub eax, dword [ebx]
mov edi, eax
call fcn.00416c29
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4079e4
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x18], esi
push 0xa
add edi, 0xfffffff6
push edi
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x28]
mov byte [esp + 0xaddc], 6
call fcn.00408a60
mov byte [esp + 0xadd0], 7
mov eax, dword [eax]
lea edi, [eax - 0x10]
lea ebx, [esi - 0x10]
cmp edi, ebx
je 0x4076ab
cmp dword [ebx + 0xc], 0
jl 0x407699
mov ecx, dword [edi]
cmp ecx, dword [ebx]
jne 0x407699
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x407643
cmp eax, dword [edi]
jne 0x407643
mov esi, edi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x407677
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x4079ee
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
inc eax
push eax
add edi, 0x10
push edi
push eax
lea ecx, [esi + 0x10]
push ecx
call fcn.0050dd07
add esp, 0x10
lea eax, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [eax], edx
dec edx
test edx, edx
jg 0x407690
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
add esi, 0x10
mov dword [esp + 0x18], esi
jmp 0x4076ab
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004020a0
mov esi, dword [esp + 0x18]
mov byte [esp + 0xadd0], 6
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4076d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esi - 4], 1
jle 0x4076ea
mov ecx, dword [esi - 0xc]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004021d0
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x148]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4076f5
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0050e49d
add esp, 8
test eax, eax
js 0x4079f3
cmp eax, dword [esi - 8]
jg 0x4079f3
mov dword [esi - 0xc], eax
mov byte [eax + esi], 0
add esi, 0xfffffff0
mov byte [esp + 0xadd0], 5
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x407748
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x1c]
inc edi
add ebx, 0xc
mov dword [esp + 0x14], edi
mov dword [esp + 0x1c], ebx
cmp edi, dword [esp + 0x28]
jl 0x407473
xor ebx, ebx
lea ecx, [esp + 0x4c]
mov byte [esp + 0xadd0], 3
call fcn.0040d2e0
lea ecx, [esp + 0x34]
mov byte [esp + 0xadd0], 1
call fcn.0040d2e0
mov edi, 0x10
mov dword [esp + 0xadd0], 0xffffffff
cmp dword [esp + 0xe8], edi
jb 0x4077b3
mov ecx, dword [esp + 0xd4]
push ecx
call fcn.0040e900
add esp, 4
mov esi, 0xf
mov dword [esp + 0xe8], esi
mov dword [esp + 0xe4], ebx
mov byte [esp + 0xd4], 0
cmp dword [esp + 0xb8], edi
jb 0x4077e7
mov edx, dword [esp + 0xa4]
push edx
call fcn.0040e900
add esp, 4
mov dword [esp + 0xb8], esi
lea esi, [esp + 0x8c]
mov dword [esp + 0xb4], ebx
mov byte [esp + 0xa4], 0
call fcn.00408ef0
mov eax, dword [esp + 0x8c]
push eax
call fcn.0040e900
mov eax, dword [esp + 0x88]
add esp, 4
mov dword [esp + 0x8c], ebx
cmp eax, ebx
je 0x407840
dec eax
jne 0x407835
mov dword [esp + 0x80], ebx
cmp eax, ebx
jne 0x40782b
mov dword [esp + 0x84], eax
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
cmp esi, ebx
jbe 0x40786a
lea esp, [esp]
dec esi
cmp dword [eax + esi*4], ebx
je 0x407866
mov ecx, dword [eax + esi*4]
push ecx
call fcn.0040e900
mov eax, dword [esp + 0x7c]
add esp, 4
cmp esi, ebx
ja 0x407850
cmp eax, ebx
je 0x407877
push eax
call fcn.0040e900
add esp, 4
mov edx, dword [esp + 0x74]
push edx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x7c], ebx
call fcn.0040e900
mov edi, dword [esp + 0x28]
add esp, 4
mov dword [esp + 0x74], ebx
push 0
push 6
push 4
push 0
push 0
push 0xc0000000
push str.C:Windows_bdtemp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0x40
lea ecx, [esp + 0x158]
mov esi, eax
push 0
push ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x50], 0
call fcn.00510790
add esp, 0xc
test esi, esi
je 0x4078f7
push 0
lea edx, [esp + 0x48]
push edx
push 0x40
lea eax, [esp + 0x160]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov byte [esp + 0x193], 0
cmp dword [esp + 0x20], 0
jle 0x407b33
mov edi, dword [esp + 0x24]
mov esi, 0x31
mov dword [esp + 0x14], esi
add edi, 8
lea ecx, [esp + 0x154]
push esi
push ecx
mov dword [esp + 0x38], esi
call fcn.0050d070
add esp, 8
test eax, eax
jne 0x407b1a
mov eax, dword [edi - 8]
cmp dword [eax - 4], 1
jle 0x407944
mov edx, dword [eax - 0xc]
push edx
lea ecx, [edi - 8]
call fcn.004021d0
mov esi, dword [edi - 8]
call fcn.00407d60
test eax, eax
jne 0x407a83
mov ebx, dword [edi - 8]
lea eax, [esp + 0xf4]
push eax
push ebx
xor esi, esi
call fcn.0050e486
add esp, 8
lea ebx, [esi + 1]
test eax, eax
jne 0x407973
mov esi, ebx
mov eax, dword [esp + 0x1c]
push 0
lea ecx, [esp + 0x48]
push ecx
push ebx
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [edi]
cmp dword [eax - 4], ebx
jle 0x40799d
mov ecx, dword [eax - 0xc]
push ecx
mov ecx, edi
call fcn.004021d0
mov ecx, dword [edi]
call fcn.00406660
mov eax, dword [edi]
test esi, esi
je 0x407a4f
cmp dword [eax - 4], ebx
jle 0x4079be
mov edx, dword [eax - 0xc]
push edx
mov ecx, edi
call fcn.004021d0
mov eax, dword [edi - 4]
cmp dword [eax - 4], 1
mov ebx, dword [edi]
jle 0x4079d5
mov eax, dword [eax - 0xc]
push eax
lea ecx, [edi - 4]
call fcn.004021d0
push 1
lea ecx, [esp + 0x14c]
push ecx
jmp 0x407a7a
push 0x80004005
call fcn.00401c30
call fcn.004021c0
push 0x80070057
call fcn.00401c30
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x60]
mov dword [esp + 0x30], ebx
call fcn.0050d312
push 0x578a18
lea ecx, [esp + 0x60]
push ecx
mov dword [esp + 0x64], vtable.std::bad_alloc.0
call fcn.00510b04
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x6c]
mov dword [esp + 0x34], ebx
call fcn.0050d312
push 0x578a18
lea eax, [esp + 0x6c]
push eax
mov dword [esp + 0x70], vtable.std::bad_alloc.0
call fcn.00510b04
cmp dword [eax - 4], ebx
jle 0x407a5f
mov edx, dword [eax - 0xc]
push edx
mov ecx, edi
call fcn.004021d0
mov eax, dword [edi - 4]
cmp dword [eax - 4], 1
mov ebx, dword [edi]
jle 0x407a76
mov eax, dword [eax - 0xc]
push eax
lea ecx, [edi - 4]
call fcn.004021d0
push 0
push 0
mov ecx, dword [edi - 4]
push ebx
call fcn.00407f00
mov eax, dword [edi - 8]
mov ecx, dword [eax - 8]
test eax, eax
je 0x407a9f
push ecx
push eax
call fcn.0050e49d
add esp, 8
test eax, eax
js 0x4079f3
mov ecx, dword [edi - 8]
cmp eax, dword [ecx - 8]
jg 0x4079f3
mov dword [ecx - 0xc], eax
mov ecx, dword [edi - 8]
mov byte [eax + ecx], 0
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x407ad0
push ecx
push eax
call fcn.0050e49d
add esp, 8
test eax, eax
js 0x4079f3
mov ecx, dword [edi]
cmp eax, dword [ecx - 8]
jg 0x4079f3
mov dword [ecx - 0xc], eax
mov edx, dword [edi]
mov byte [eax + edx], 0
mov eax, dword [edi - 4]
mov ecx, dword [eax - 8]
test eax, eax
je 0x407b00
push ecx
push eax
call fcn.0050e49d
add esp, 8
test eax, eax
js 0x4079f3
mov ecx, dword [edi - 4]
cmp eax, dword [ecx - 8]
jg 0x4079f3
mov esi, dword [esp + 0x14]
mov dword [ecx - 0xc], eax
mov ecx, dword [edi - 4]
mov byte [eax + ecx], 0
inc esi
lea edx, [esi - 0x31]
add edi, 0xc
mov dword [esp + 0x14], esi
cmp edx, dword [esp + 0x20]
jl 0x407912
mov edi, dword [esp + 0x24]
test edi, edi
je 0x407b54
mov eax, dword [edi - 4]
push 0x407cd0
lea esi, [edi - 4]
push eax
push 0xc
push edi
call fcn.0050e8df
push esi
call fcn.0040e900
add esp, 4
mov ecx, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
push 0
push 6
push 4
push 0
push 0
push 0xc0000000
push str.C:WindowsKJFT
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
test esi, esi
je 0x407ba1
push 0
lea edx, [esp + 0x30]
push edx
push 1
push 0x5613a8
push esi
mov dword [esp + 0x40], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call edi
xor eax, eax
mov ecx, dword [esp + 0xadc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xadb0]
xor ecx, esp
call fcn.0050cbf9
mov esp, ebp
pop ebp
ret