Function at 0x404200
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x593b11
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x5fedec]
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 esi, dword [ebp + 8]
lea eax, [ebp - 0x110]
push 0xff
push 0
push eax
call fcn.00570bf0
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 0xc
or edi, 0xffffffff
cmp dword [esi + 0x98], 3
jne 0x404afa
push 0
lea eax, [ebp - 0x124]
push eax
push 8
push str.ATCGSN_r
push dword [esi]
call ebx
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00570bf0
add esp, 0xc
lea eax, [ebp - 0x124]
push 0
push eax
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x110]
push 0x5a6fd0
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
je 0x40445c
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x120]
call fcn.00402190
mov eax, dword [ebp - 0x120]
mov dword [ebp - 4], 0
cmp dword [eax - 0xc], 0
jl 0x4043c0
push str.ATCGSN
push eax
call fcn.00573520
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x120]
test ecx, ecx
je 0x40431e
sub ecx, eax
cmp ecx, edi
je 0x40431e
push 7
push 0
lea ecx, [ebp - 0x120]
call fcn.00402de0
mov eax, dword [ebp - 0x120]
cmp dword [eax - 0xc], 0
jle 0x40435d
push 0xd
push eax
call fcn.00573270
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x120]
test ecx, ecx
je 0x404359
sub ecx, eax
cmp ecx, 0xffffffff
je 0x404359
lea eax, [ecx + 1]
push eax
push 0
lea ecx, [ebp - 0x120]
call fcn.00402de0
mov eax, dword [ebp - 0x120]
cmp dword [eax - 0xc], 0
jl 0x4043c0
push 0x5a6fd0
push eax
call fcn.00573520
add esp, 8
test eax, eax
je 0x4043c0
sub eax, dword [ebp - 0x120]
cmp eax, 0xffffffff
je 0x4043c0
push eax
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x120]
call fcn.00405460
push eax
lea ecx, [ebp - 0x120]
mov byte [ebp - 4], 1
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4043c0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x120]
call fcn.00406530
mov ecx, eax
call fcn.00406490
mov eax, dword [ebp - 0x120]
cmp dword [eax - 4], 1
jle 0x4043f2
push dword [eax - 0xc]
lea ecx, [ebp - 0x120]
call fcn.00402ef0
mov eax, dword [ebp - 0x120]
cmp byte [eax], 0
jne 0x4043fb
xor edx, edx
jmp 0x40440f
mov edx, eax
lea ebx, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x404400
sub edx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edx
push eax
lea ecx, [esi + 0x50]
call fcn.00406e30
mov edx, dword [ebp - 0x120]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
cmp dword [esi + 0x60], 0
je 0x404448
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x404441
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
jmp 0x405198
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40445c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
lea eax, [ebp - 0x120]
push eax
push 0xd
push str.ATCPBS_ME__r
push dword [esi]
call ebx
push 0
lea eax, [ebp - 0x120]
push eax
push 0xa
push str.ATCPBR1_r
push dword [esi]
call ebx
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00570bf0
add esp, 0xc
lea eax, [ebp - 0x120]
push 0
push eax
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x114]
call fcn.00402190
push 0x5a6f6e
lea ecx, [ebp - 0x11c]
mov dword [ebp - 4], 2
call fcn.00402190
mov eax, dword [ebp - 0x114]
mov byte [ebp - 4], 3
cmp dword [eax - 0xc], 0
jl 0x404601
push str.ERROR
push eax
call fcn.00573520
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x114]
test ecx, ecx
je 0x404601
sub ecx, eax
cmp ecx, 0xffffffff
je 0x404601
lea eax, [ebp - 0x118]
push eax
call fcn.00407560
push dword [ebp - 0x118]
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 4
push str.ATCPBW1___s__129__WMSN__r
push eax
call fcn.00402f70
mov eax, dword [ebp - 0x118]
add esp, 0x10
mov ebx, dword [eax - 0xc]
test ebx, ebx
jns 0x40455e
push 0x80070057
call fcn.00402b90
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, ebx
or ecx, edx
jge 0x404581
push ebx
lea ecx, [ebp - 0x118]
call fcn.00405990
mov eax, dword [ebp - 0x118]
mov edx, eax
lea ebx, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x404586
push 0
lea ecx, [ebp - 0x124]
sub edx, ebx
push ecx
push edx
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00570bf0
add esp, 0xc
lea eax, [ebp - 0x124]
push 0
push eax
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [ebp - 0x110]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4045e0
sub ecx, edx
lea eax, [ebp - 0x110]
push ecx
push eax
lea ecx, [ebp - 0x114]
call fcn.00405ff0
jmp 0x4047cc
push 0x22
push eax
call fcn.00573473
mov ecx, eax
add esp, 8
sub ecx, dword [ebp - 0x114]
test eax, eax
lea eax, [ebp - 0x118]
cmove ecx, edi
push ecx
push eax
lea ecx, [ebp - 0x114]
call fcn.00405460
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 5
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40465d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x22
push dword [ebp - 0x11c]
call fcn.00573473
mov ecx, dword [ebp - 0x11c]
mov edx, eax
add esp, 8
sub edx, ecx
test eax, eax
mov eax, dword [ecx - 0xc]
cmove edx, edi
sub eax, edx
lea ecx, [ebp - 0x11c]
dec eax
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00405e90
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 6
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4046c6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x5a6f6e
push dword [ebp - 0x11c]
call fcn.00573329
add esp, 8
test eax, eax
sete al
test al, al
jne 0x404702
push str.WMSN
push dword [ebp - 0x11c]
call fcn.00573329
add esp, 8
test eax, eax
sete al
test al, al
jne 0x4047ed
mov eax, dword [ebp - 0x114]
cmp dword [eax - 0xc], 0
jl 0x40472f
push str.ERROR
push eax
call fcn.00573520
add esp, 8
test eax, eax
je 0x40472f
sub eax, dword [ebp - 0x114]
cmp eax, 0xffffffff
jne 0x4047ed
lea eax, [ebp - 0x118]
push eax
call fcn.00407560
push dword [ebp - 0x118]
lea eax, [ebp - 0x118]
mov byte [ebp - 4], 7
push str.ATCPBW1___s__129__WMSN__r
push eax
call fcn.00402f70
mov eax, dword [ebp - 0x118]
lea ecx, [ebp - 0x118]
add esp, 0x10
push dword [eax - 0xc]
call fcn.004032f0
mov edx, eax
lea ebx, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x404772
push 0
lea ecx, [ebp - 0x124]
sub edx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push ecx
push edx
push eax
push dword [esi]
call ebx
push 0
lea eax, [ebp - 0x124]
push eax
push 0xa
push str.ATCPBR1_r
push dword [esi]
call ebx
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call fcn.00407780
add esp, 0xc
lea eax, [ebp - 0x110]
lea ecx, [ebp - 0x114]
push eax
call fcn.00402a20
mov edx, dword [ebp - 0x118]
mov eax, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 3
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4047ed
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x22
push dword [ebp - 0x114]
call fcn.00573473
mov ecx, eax
add esp, 8
sub ecx, dword [ebp - 0x114]
test eax, eax
lea eax, [ebp - 0x118]
cmove ecx, edi
push ecx
push eax
lea ecx, [ebp - 0x114]
call fcn.00405460
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 8
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40484e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x22
push dword [ebp - 0x11c]
call fcn.00573473
mov ecx, dword [ebp - 0x11c]
mov edx, eax
add esp, 8
sub edx, ecx
test eax, eax
mov eax, dword [ecx - 0xc]
cmove edx, edi
sub eax, edx
lea ecx, [ebp - 0x11c]
dec eax
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00405e90
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 9
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4048b7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x114]
cmp dword [eax - 0xc], 0
jl 0x4048e4
push str.ERROR
push eax
call fcn.00573520
add esp, 8
test eax, eax
je 0x4048e4
sub eax, dword [ebp - 0x114]
cmp eax, 0xffffffff
jne 0x404d74
lea ecx, [ebp - 0x114]
call fcn.00406530
mov ecx, eax
call fcn.00406490
push 0x5a6f6e
push dword [eax]
call fcn.00573329
add esp, 8
test eax, eax
sete al
test al, al
jne 0x404d74
push str.WMSN
push dword [ebp - 0x11c]
call fcn.00573329
add esp, 8
test eax, eax
setne al
test al, al
jne 0x404d74
mov eax, dword [ebp - 0x114]
cmp dword [eax - 0xc], 0
jg 0x404943
or edx, 0xffffffff
jmp 0x40495f
push 0x2c
push eax
call fcn.00573270
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x114]
mov edx, ecx
sub edx, eax
test ecx, ecx
cmove edx, edi
mov eax, dword [eax - 0xc]
lea ecx, [ebp - 0x114]
sub eax, edx
sub eax, 2
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.00405e90
push eax
lea ecx, [ebp - 0x114]
mov byte [ebp - 4], 0xa
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4049ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x114]
cmp dword [eax - 0xc], 0
jg 0x4049bc
or ecx, 0xffffffff
jmp 0x4049d4
push 0x2c
push eax
call fcn.00573270
mov ecx, eax
add esp, 8
sub ecx, dword [ebp - 0x114]
test eax, eax
cmove ecx, edi
lea eax, [ecx - 1]
push eax
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x114]
call fcn.00405460
push eax
lea ecx, [ebp - 0x114]
mov byte [ebp - 4], 0xb
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404a1b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x114]
cmp dword [eax - 4], 1
jle 0x404a3b
push dword [eax - 0xc]
lea ecx, [ebp - 0x114]
call fcn.00402ef0
mov eax, dword [ebp - 0x114]
push eax
lea ecx, [esi + 0x50]
call fcn.00402a60
xor ebx, ebx
cmp ebx, 3
jge 0x404aaf
push 0
lea eax, [ebp - 0x124]
inc ebx
push eax
push 0xd
push str.ATRSSIREP0_r
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00570bf0
add esp, 0xc
lea eax, [ebp - 0x118]
push 0
push eax
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x110]
push 0x5a6fd0
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
je 0x404a46
mov edx, dword [ebp - 0x11c]
mov eax, edi
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404ad0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x114]
mov eax, edi
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404af4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 0x98]
cmp eax, 5
je 0x404b36
cmp eax, 1
je 0x404b36
cmp eax, 2
je 0x404b36
cmp eax, 6
je 0x404b36
cmp eax, 8
je 0x404b36
cmp eax, 9
je 0x404b36
cmp eax, 0xa
je 0x404b36
cmp eax, 0xb
je 0x404b36
cmp eax, 0xe
je 0x404b36
cmp eax, 0xd
jne 0x404e00
push 0
lea eax, [ebp - 0x124]
push eax
push 8
push str.ATCGSN_r
push dword [esi]
call ebx
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00570bf0
add esp, 0xc
lea eax, [ebp - 0x124]
push 0
push eax
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x110]
push str.ERROR
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
je 0x404baa
cmp dword [esi + 0x64], 0x10
lea eax, [esi + 0x50]
mov dword [eax + 0x10], 0
jb 0x404ba7
mov eax, dword [eax]
mov byte [eax], 0
lea eax, [ebp - 0x110]
push 0x5a6fd0
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
je 0x404e00
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x114]
call fcn.00402190
mov eax, dword [ebp - 0x114]
mov dword [ebp - 4], 0xc
cmp dword [eax - 0xc], 0
jl 0x404d39
push str.ATCGSN
push eax
call fcn.00573520
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x114]
test ecx, ecx
je 0x404c25
sub ecx, eax
cmp ecx, 0xffffffff
je 0x404c25
push 7
push 0
lea ecx, [ebp - 0x114]
call fcn.00402de0
mov eax, dword [ebp - 0x114]
cmp dword [eax - 0xc], 0
jle 0x404cd6
push 0xd
push eax
call fcn.00573270
mov ecx, eax
add esp, 8
mov eax, dword [ebp - 0x114]
test ecx, ecx
je 0x404c64
sub ecx, eax
cmp ecx, 0xffffffff
je 0x404c64
lea eax, [ecx + 1]
push eax
push 0
lea ecx, [ebp - 0x114]
call fcn.00402de0
mov eax, dword [ebp - 0x114]
cmp dword [eax - 0xc], 0
jle 0x404cd6
push 0xd
push eax
call fcn.00573270
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x404ccc
mov eax, dword [ebp - 0x114]
sub ecx, eax
cmp ecx, 0xffffffff
je 0x404cd2
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x114]
call fcn.00405460
push eax
lea ecx, [ebp - 0x114]
mov byte [ebp - 4], 0xd
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 0xc
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404ccc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x114]
cmp dword [eax - 0xc], 0
jl 0x404d39
push 0x5a6fd0
push eax
call fcn.00573520
add esp, 8
test eax, eax
je 0x404d39
sub eax, dword [ebp - 0x114]
cmp eax, 0xffffffff
je 0x404d39
push eax
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x114]
call fcn.00405460
push eax
lea ecx, [ebp - 0x114]
mov byte [ebp - 4], 0xe
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 0xc
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404d39
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x114]
call fcn.00406530
mov ecx, eax
call fcn.00406490
mov eax, dword [ebp - 0x114]
cmp dword [eax - 4], 1
jle 0x404d6b
push dword [eax - 0xc]
lea ecx, [ebp - 0x114]
call fcn.00402ef0
mov eax, dword [ebp - 0x114]
cmp byte [eax], 0
jne 0x404dbe
xor edx, edx
jmp 0x404dd2
mov edx, dword [ebp - 0x11c]
mov eax, edi
mov byte [ebp - 4], 2
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404d95
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x114]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x404db7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
jmp 0x405198
mov edx, eax
lea ebx, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x404dc3
sub edx, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edx
push eax
lea ecx, [esi + 0x50]
call fcn.00406e30
mov edx, dword [ebp - 0x114]
mov eax, edi
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404e00
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi + 0x98]
test eax, eax
je 0x404e18
cmp eax, 0xffffffff
je 0x404e18
cmp eax, 7
jne 0x405191
push 0
lea eax, [ebp - 0x124]
push eax
push 8
push str.ATWMSN_r
push dword [esi]
call ebx
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00570bf0
add esp, 0xc
lea eax, [ebp - 0x124]
push 0
push eax
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x110]
push str.ERROR
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
jne 0x404e8f
lea eax, [ebp - 0x110]
push str.Serial_Number
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
jne 0x404ea4
cmp dword [esi + 0x64], 0x10
lea eax, [esi + 0x50]
mov dword [eax + 0x10], 0
jb 0x404ea1
mov eax, dword [eax]
mov byte [eax], 0
lea eax, [ebp - 0x110]
push str.Serial_Number
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
je 0x405006
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x11c]
call fcn.00402190
mov eax, dword [ebp - 0x11c]
mov dword [ebp - 4], 0xf
cmp dword [eax - 0xc], 0
jge 0x404eea
or ecx, 0xffffffff
jmp 0x404f05
push str.Serial_Number
push eax
call fcn.00573520
mov ecx, eax
add esp, 8
sub ecx, dword [ebp - 0x11c]
test eax, eax
cmove ecx, edi
lea eax, [ecx + 0xe]
push eax
push 0
lea ecx, [ebp - 0x11c]
call fcn.00402de0
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 0xc], 0
jg 0x404f27
or ecx, 0xffffffff
jmp 0x404f3f
push 0xd
push eax
call fcn.00573270
mov ecx, eax
add esp, 8
sub ecx, dword [ebp - 0x11c]
test eax, eax
cmove ecx, edi
push ecx
lea eax, [ebp - 0x118]
push eax
lea ecx, [ebp - 0x11c]
call fcn.00405460
push eax
lea ecx, [ebp - 0x11c]
mov byte [ebp - 4], 0x10
call fcn.004029b0
mov edx, dword [ebp - 0x118]
mov eax, edi
mov byte [ebp - 4], 0xf
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404f83
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x11c]
call fcn.00406530
mov ecx, eax
call fcn.00406490
mov eax, dword [ebp - 0x11c]
cmp dword [eax - 4], 1
jle 0x404fb5
push dword [eax - 0xc]
lea ecx, [ebp - 0x11c]
call fcn.00402ef0
mov eax, dword [ebp - 0x11c]
cmp byte [eax], 0
jne 0x404fbe
xor edx, edx
jmp 0x404fcc
mov edx, eax
lea ebx, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x404fc3
sub edx, ebx
push edx
push eax
lea ecx, [esi + 0x50]
call fcn.00406e30
cmp dword [esi + 0x60], 0
mov eax, dword [ebp - 0x11c]
setne bl
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x404fff
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
jmp 0x405198
push 0
lea eax, [ebp - 0x124]
push eax
push 8
push str.ATCGSN_r
push dword [esi]
call ebx
push 0xff
lea eax, [ebp - 0x110]
push 0
push eax
call fcn.00570bf0
add esp, 0xc
lea eax, [ebp - 0x124]
push 0
push eax
push 0xff
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x110]
push str.ERROR
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
jne 0x40507d
lea eax, [ebp - 0x110]
push str.Serial_Number
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
jne 0x405092
cmp dword [esi + 0x64], 0x10
lea eax, [esi + 0x50]
mov dword [eax + 0x10], 0
jb 0x40508f
mov eax, dword [eax]
mov byte [eax], 0
lea eax, [ebp - 0x110]
push 0x5a6fd0
push eax
call fcn.0056ffc0
add esp, 8
test eax, eax
je 0x405191
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x118]
call fcn.00402190
mov eax, dword [ebp - 0x118]
mov dword [ebp - 4], 0x11
cmp dword [eax - 0xc], 0
jl 0x405134
push 0x5a6fd0
push eax
call fcn.00573520
add esp, 8
test eax, eax
je 0x405134
sub eax, dword [ebp - 0x118]
cmp eax, 0xffffffff
je 0x405134
push eax
lea eax, [ebp - 0x124]
push eax
lea ecx, [ebp - 0x118]
call fcn.00405460
push eax
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 0x12
call fcn.004029b0
mov edx, dword [ebp - 0x124]
mov eax, edi
mov byte [ebp - 4], 0x11
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405134
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x118]
call fcn.00406530
mov ecx, eax
call fcn.00406490
mov eax, dword [ebp - 0x118]
cmp dword [eax - 4], 1
jle 0x405166
push dword [eax - 0xc]
lea ecx, [ebp - 0x118]
call fcn.00402ef0
mov eax, dword [ebp - 0x118]
push eax
lea ecx, [esi + 0x50]
call fcn.00402a60
mov edx, dword [ebp - 0x118]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x405191
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi + 0x60], 0
setne al
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.0056b237
mov esp, ebp
pop ebp
ret