Function at 0x406330
Capabilities:
Copy file
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49d2f1
mov eax, dword fs:[0]
push eax
sub esp, 0x504
mov eax, dword [0x4c9230]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x504], ecx
mov ecx, dword [ebp - 0x504]
call fcn.004340a1
push str._DATA_
lea eax, [ebp - 0x3d8]
push eax
mov ecx, 0x4ca874
call fcn.004137e0
mov dword [ebp - 0x3f4], eax
mov ecx, dword [ebp - 0x3f4]
mov edx, dword [ecx]
mov dword [ebp - 0x3f8], edx
mov eax, dword [ebp - 0x3f8]
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x3fee33
push ecx
call fcn.0046f198
add esp, 8
lea ecx, [ebp - 0x3d8]
call fcn.00401d60
push 0x32c8
push 0x401
mov edx, dword [ebp - 0x504]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x9c
call fcn.0041ae90
mov ecx, dword [ebp - 0x504]
call fcn.004085f0
mov ecx, dword [ebp - 0x504]
call fcn.00409530
mov byte [ebp - 0x264], 0
push 0x103
push 0
lea ecx, [ebp - 0x263]
push ecx
call fcn.00469c10
add esp, 0xc
mov edx, dword [ebp - 0x504]
add edx, 0x3fee33
push edx
push str._sBasicApp.ini
lea eax, [ebp - 0x264]
push eax
call fcn.0046f198
add esp, 0xc
lea ecx, [ebp - 0x264]
push ecx
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40050
call fcn.00419fb0
push str.SUBSTRSTE_BARCODE
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40050
call fcn.0041a000
push 0
push str.BarcodeSwitch
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40050
call fcn.0041a110
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x2d3ffb5], eax
push 0x4a4ae2
lea ecx, [ebp - 0x280]
call fcn.004019c0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x504]
add eax, 0x3fee33
push eax
push str._sMain.ini
lea ecx, [ebp - 0x280]
push ecx
call fcn.00402f10
add esp, 0xc
mov edx, dword [ebp - 0x280]
push edx
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40044
call fcn.00419fb0
push str.CUSTOMER_OPTION
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40044
call fcn.0041a000
push 1
push str.StripMapFunc
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40044
call fcn.0041a110
mov ecx, dword [ebp - 0x504]
mov dword [ecx + 0x2d3ffc1], eax
push 1
push str.LotTrackOut
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40044
call fcn.0041a110
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x2d3ffc5], eax
push str.NET_GET_MAP_FILE
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40044
call fcn.0041a000
push 0
push str.CreateFileNameMax
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40044
call fcn.0041a110
mov ecx, dword [ebp - 0x504]
mov dword [ecx + 0x2d3ffc9], eax
push 0
push str.MidMaxLen
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40044
call fcn.0041a110
mov edx, dword [ebp - 0x504]
mov byte [edx + 0x2d3ffcd], al
push 0x4a4ae2
lea ecx, [ebp - 0x158]
call fcn.004019c0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x27c]
call fcn.004369c3
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x504]
add eax, 0x3fee33
push eax
push str._sBarcodeSetup.ini
lea ecx, [ebp - 0x158]
push ecx
call fcn.00402f10
add esp, 0xc
mov edx, dword [ebp - 0x158]
push edx
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d4000b
call fcn.00419fb0
mov eax, dword [ebp - 0x158]
mov dword [ebp - 0x430], eax
push 0
mov ecx, dword [ebp - 0x430]
push ecx
lea ecx, [ebp - 0x27c]
call fcn.00436a58
test eax, eax
je 0x406624
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x2d3ff22], 1
jmp 0x406634
mov eax, dword [ebp - 0x504]
mov dword [eax + 0x2d3ff22], 0
mov ecx, dword [ebp - 0x504]
cmp dword [ecx + 0x1f770d2], 1
jne 0x406a7d
mov byte [ebp - 0x2c4], 0
push 0x3f
push 0
lea edx, [ebp - 0x2c3]
push edx
call fcn.00469c10
add esp, 0xc
mov eax, dword [ebp - 0x504]
add eax, 0x1f770e2
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x1f770de
push ecx
mov edx, dword [ebp - 0x504]
add edx, 0x1f770da
push edx
mov eax, dword [ebp - 0x504]
add eax, 0x1f770d6
push eax
push str._s._s._s._s
lea ecx, [ebp - 0x2c4]
push ecx
call fcn.0046f198
add esp, 0x18
mov edx, dword [ebp - 0x504]
movzx eax, byte [edx + 0x1f770e6]
mov ecx, dword [ebp - 0x504]
mov dword [ecx + 0x3fee97], eax
mov edx, dword [ebp - 0x504]
add edx, 0x3ff2c8
mov dword [ebp - 0x454], edx
mov eax, str.MapCom
test eax, eax
jne 0x4066e7
mov dword [ebp - 0x434], 0
jmp 0x4066fa
push str.MapCom
call fcn.00469b80
add esp, 4
mov dword [ebp - 0x434], eax
mov ecx, dword [ebp - 0x434]
push ecx
push str.MapCom
mov ecx, dword [ebp - 0x454]
call fcn.00401f10
mov edx, dword [ebp - 0x504]
add edx, 0x2d3ffce
push edx
mov eax, dword [ebp - 0x504]
add eax, 0x3fee33
push eax
lea ecx, [ebp - 0x2c4]
push ecx
mov edx, dword [ebp - 0x504]
add edx, 0xd52c
push edx
call fcn.0046f6cb
add esp, 4
push eax
push 0x404
mov eax, dword [ebp - 0x504]
mov ecx, dword [eax + 0x20]
push ecx
mov ecx, dword [ebp - 0x504]
add ecx, 0x3fee93
call fcn.0041c100
mov edx, dword [ebp - 0x504]
add edx, 0x3fee91
push edx
call fcn.0046f6cb
add esp, 4
cmp eax, 2
je 0x406797
push 0x4a5734
mov ecx, dword [ebp - 0x504]
add ecx, 0x3fee93
call fcn.0041ca20
mov eax, dword [ebp - 0x504]
add eax, 0x3fee91
push eax
call fcn.0046f6cb
add esp, 4
mov ecx, dword [ebp - 0x504]
mov dword [ecx + 0x3fee9b], eax
mov edx, dword [ebp - 0x504]
movsx eax, byte [edx + 0xd5d8]
cmp eax, 0x31
jne 0x406922
mov ecx, dword [ebp - 0x504]
add ecx, 0x1f770e2
push ecx
mov edx, dword [ebp - 0x504]
add edx, 0x1f770de
push edx
mov eax, dword [ebp - 0x504]
add eax, 0x1f770da
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x1f770d6
push ecx
push str._s._s._s._s
lea edx, [ebp - 0x2c4]
push edx
call fcn.0046f198
add esp, 0x18
mov eax, dword [ebp - 0x504]
movzx ecx, byte [eax + 0x1f770e6]
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x3ff2d0], ecx
mov eax, dword [ebp - 0x504]
add eax, 0x3ff701
mov dword [ebp - 0x478], eax
mov ecx, str.PcCom
test ecx, ecx
jne 0x406853
mov dword [ebp - 0x458], 0
jmp 0x406866
push str.PcCom
call fcn.00469b80
add esp, 4
mov dword [ebp - 0x458], eax
mov edx, dword [ebp - 0x458]
push edx
push str.PcCom
mov ecx, dword [ebp - 0x478]
call fcn.00401f10
mov eax, dword [ebp - 0x504]
add eax, 0x2d3ffce
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x3fee33
push ecx
lea edx, [ebp - 0x2c4]
push edx
mov eax, dword [ebp - 0x504]
add eax, 0xd536
push eax
call fcn.0046f6cb
add esp, 4
push eax
push 0x405
mov ecx, dword [ebp - 0x504]
mov edx, dword [ecx + 0x20]
push edx
mov ecx, dword [ebp - 0x504]
add ecx, 0x3ff2cc
call fcn.0041c100
mov eax, dword [ebp - 0x504]
add eax, 0x3fee91
push eax
call fcn.0046f6cb
add esp, 4
cmp eax, 2
je 0x406901
push 0x4a5734
mov ecx, dword [ebp - 0x504]
add ecx, 0x3ff2cc
call fcn.0041ca20
mov ecx, dword [ebp - 0x504]
add ecx, 0x3fee91
push ecx
call fcn.0046f6cb
add esp, 4
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x3ff2d4], eax
mov eax, dword [ebp - 0x504]
add eax, 0x1f770e2
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x1f770de
push ecx
mov edx, dword [ebp - 0x504]
add edx, 0x1f770da
push edx
mov eax, dword [ebp - 0x504]
add eax, 0x1f770d6
push eax
push str._s._s._s._s
lea ecx, [ebp - 0x2c4]
push ecx
call fcn.0046f198
add esp, 0x18
mov edx, dword [ebp - 0x504]
movzx eax, byte [edx + 0x1f770e6]
mov ecx, dword [ebp - 0x504]
mov dword [ecx + 0x3ff709], eax
mov edx, dword [ebp - 0x504]
add edx, 0x3ffb3a
mov dword [ebp - 0x49c], edx
mov eax, str.Port3
test eax, eax
jne 0x4069a8
mov dword [ebp - 0x47c], 0
jmp 0x4069bb
push str.Port3
call fcn.00469b80
add esp, 4
mov dword [ebp - 0x47c], eax
mov ecx, dword [ebp - 0x47c]
push ecx
push str.Port3
mov ecx, dword [ebp - 0x49c]
call fcn.00401f10
mov edx, dword [ebp - 0x504]
add edx, 0x2d3ffce
push edx
mov eax, dword [ebp - 0x504]
add eax, 0x3fee33
push eax
lea ecx, [ebp - 0x2c4]
push ecx
mov edx, dword [ebp - 0x504]
add edx, 0xd540
push edx
call fcn.0046f6cb
add esp, 4
push eax
push 0x406
mov eax, dword [ebp - 0x504]
mov ecx, dword [eax + 0x20]
push ecx
mov ecx, dword [ebp - 0x504]
add ecx, 0x3ff705
call fcn.0041c100
mov edx, dword [ebp - 0x504]
add edx, 0x3fee91
push edx
call fcn.0046f6cb
add esp, 4
cmp eax, 2
je 0x406a58
push 0x4a5734
mov ecx, dword [ebp - 0x504]
add ecx, 0x3ff705
call fcn.0041ca20
mov eax, dword [ebp - 0x504]
add eax, 0x3fee91
push eax
call fcn.0046f6cb
add esp, 4
mov ecx, dword [ebp - 0x504]
mov dword [ecx + 0x3ff70d], eax
jmp 0x406b10
push 0x32c8
push 0x7d0
push 0x4b00
mov edx, dword [ebp - 0x504]
add edx, 0xd52c
push edx
mov ecx, dword [ebp - 0x504]
add ecx, 0x242
call fcn.0041b300
mov eax, dword [ebp - 0x504]
movzx ecx, byte [eax + 0xd528]
push ecx
mov edx, dword [ebp - 0x504]
movzx eax, byte [edx + 0xd52a]
push eax
mov ecx, dword [ebp - 0x504]
movzx edx, byte [ecx + 0xd526]
push edx
mov eax, dword [ebp - 0x504]
movzx ecx, word [eax + 0xd51e]
push ecx
mov ecx, dword [ebp - 0x504]
add ecx, 0x242
call fcn.0041b5e0
push 0
mov edx, dword [ebp - 0x504]
mov eax, dword [edx + 0x20]
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x242
call fcn.0041b930
mov ecx, dword [ebp - 0x504]
movsx edx, byte [ecx + 0x2d3fedc]
cmp edx, 0x31
jne 0x406ba8
push 0x32c8
push 0x7d0
push 0x4b00
mov eax, dword [ebp - 0x504]
add eax, 0x2d3fed6
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d32baf
call fcn.0041b300
mov ecx, dword [ebp - 0x504]
movzx edx, byte [ecx + 0x2d3fe94]
push edx
mov eax, dword [ebp - 0x504]
movzx ecx, byte [eax + 0x2d3fe95]
push ecx
mov edx, dword [ebp - 0x504]
movzx eax, byte [edx + 0x2d3fe93]
push eax
mov ecx, dword [ebp - 0x504]
movzx edx, word [ecx + 0x2d3fe8f]
push edx
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d32baf
call fcn.0041b5e0
push 0
mov ecx, dword [ebp - 0x504]
call fcn.0040b180
mov eax, dword [ebp - 0x504]
cmp dword [eax + 0x2d3ffb5], 1
jl 0x406c89
push 0x32c8
push 0x7d0
push 0x4b00
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d3ff6d
push ecx
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d3951d
call fcn.0041b300
mov edx, dword [ebp - 0x504]
movzx eax, byte [edx + 0x2d3ff2b]
push eax
mov ecx, dword [ebp - 0x504]
movzx edx, byte [ecx + 0x2d3ff2c]
push edx
mov eax, dword [ebp - 0x504]
movzx ecx, byte [eax + 0x2d3ff2a]
push ecx
mov edx, dword [ebp - 0x504]
movzx eax, word [edx + 0x2d3ff26]
push eax
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d3951d
call fcn.0041b5e0
mov ecx, dword [ebp - 0x504]
cmp dword [ecx + 0x2d3ffb5], 1
jne 0x406c4f
push 1
mov ecx, dword [ebp - 0x504]
call fcn.0040b180
jmp 0x406c89
mov edx, dword [ebp - 0x504]
cmp dword [edx + 0x2d3ffb5], 2
jne 0x406c6d
push 1
mov ecx, dword [ebp - 0x504]
call fcn.0040c8d0
jmp 0x406c89
mov eax, dword [ebp - 0x504]
cmp dword [eax + 0x2d3ffb5], 3
jne 0x406c89
push 1
mov ecx, dword [ebp - 0x504]
call fcn.0040b8d0
push 2
mov ecx, dword [ebp - 0x504]
add ecx, 0x3fee33
push ecx
mov edx, esp
mov dword [ebp - 0x3dc], esp
push ecx
mov ecx, edx
call fcn.004019c0
mov dword [ebp - 0x508], eax
call fcn.00402a80
add esp, 8
mov dword [ebp - 0x50c], eax
mov eax, dword [ebp - 0x504]
mov ecx, dword [ebp - 0x50c]
mov dword [eax + 0x2d3fe8b], ecx
mov edx, dword [ebp - 0x504]
mov byte [edx + 0xd5d7], 1
mov eax, dword [ebp - 0x504]
add eax, 0x3fec30
push eax
call fcn.0046f6cb
add esp, 4
cwde
cdq
mov ecx, 0x19
idiv ecx
mov edx, dword [ebp - 0x504]
mov word [edx + 0x3fec3a], ax
mov eax, dword [ebp - 0x504]
add eax, 0x3fee87
push eax
push 0
mov ecx, dword [ebp - 0x504]
push ecx
push 0x40aa00
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x3fee83], eax
mov dword [ebp - 0x284], 0
push str._DATA_BasicLog.Log
lea eax, [ebp - 0x3e0]
push eax
mov ecx, 0x4ca874
call fcn.004137e0
mov dword [ebp - 0x4b8], eax
mov ecx, dword [ebp - 0x4b8]
mov edx, dword [ecx]
mov dword [ebp - 0x4bc], edx
lea eax, [ebp - 0x154]
push eax
mov ecx, dword [ebp - 0x4bc]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x284], eax
lea ecx, [ebp - 0x3e0]
call fcn.00401d60
cmp dword [ebp - 0x284], 0xffffffff
je 0x406edc
cmp dword [ebp - 0x134], 0x1f4000
jbe 0x406ecd
mov byte [ebp - 0x3cc], 0
push 0xff
push 0
lea edx, [ebp - 0x3cb]
push edx
call fcn.00469c10
add esp, 0xc
push str._DATA_BasicLog.Log
lea eax, [ebp - 0x3e4]
push eax
mov ecx, 0x4ca874
call fcn.004137e0
mov dword [ebp - 0x510], eax
push str._bak
mov ecx, dword [ebp - 0x510]
mov edx, dword [ecx]
push edx
push 0x4a5700
lea eax, [ebp - 0x3cc]
push eax
call fcn.0046f198
add esp, 0x10
lea ecx, [ebp - 0x3e4]
call fcn.00401d60
push str._DATA_BasicLog.Log
lea ecx, [ebp - 0x3e8]
push ecx
mov ecx, 0x4ca874
call fcn.004137e0
mov dword [ebp - 0x4c8], eax
mov edx, dword [ebp - 0x4c8]
mov eax, dword [edx]
mov dword [ebp - 0x4cc], eax
push 0
lea ecx, [ebp - 0x3cc]
push ecx
mov edx, dword [ebp - 0x4cc]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [ebp - 0x3e8]
call fcn.00401d60
push str._DATA_BasicLog.Log
lea eax, [ebp - 0x3ec]
push eax
mov ecx, 0x4ca874
call fcn.004137e0
mov dword [ebp - 0x4d4], eax
mov ecx, dword [ebp - 0x4d4]
mov edx, dword [ecx]
mov dword [ebp - 0x4d8], edx
push 0x4a56fc
mov eax, dword [ebp - 0x4d8]
push eax
call fcn.0046f632
add esp, 8
mov dword [ebp - 0x2c8], eax
lea ecx, [ebp - 0x3ec]
call fcn.00401d60
cmp dword [ebp - 0x2c8], 0
je 0x406ecd
mov ecx, dword [ebp - 0x2c8]
push ecx
call fcn.0046f4f2
add esp, 4
mov dword [ebp - 0x2c8], 0
mov edx, dword [ebp - 0x284]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x406f4d
push str._DATA_BasicLog.Log
lea eax, [ebp - 0x3f0]
push eax
mov ecx, 0x4ca874
call fcn.004137e0
mov dword [ebp - 0x4e0], eax
mov ecx, dword [ebp - 0x4e0]
mov edx, dword [ecx]
mov dword [ebp - 0x4e4], edx
push 0x4a56fc
mov eax, dword [ebp - 0x4e4]
push eax
call fcn.0046f632
add esp, 8
mov dword [ebp - 0x3d0], eax
lea ecx, [ebp - 0x3f0]
call fcn.00401d60
cmp dword [ebp - 0x3d0], 0
je 0x406f4d
mov ecx, dword [ebp - 0x3d0]
push ecx
call fcn.0046f4f2
add esp, 4
mov dword [ebp - 0x3d0], 0
push str.State_Mutex
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x3fec3e], eax
push str.RecData_Mutex
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov ecx, dword [ebp - 0x504]
mov dword [ecx + 0x3fec42], eax
push str.MainData_Mutex
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
mov edx, dword [ebp - 0x504]
mov dword [edx + 0x3fec46], eax
mov dword [ebp - 0x3d4], 0
jmp 0x406fc2
mov eax, dword [ebp - 0x3d4]
add eax, 1
mov dword [ebp - 0x3d4], eax
cmp dword [ebp - 0x3d4], 3
jge 0x40702c
mov ecx, dword [ebp - 0x3d4]
mov edx, dword [ebp - 0x504]
cmp dword [edx + ecx*4 + 0x3fec3e], 0
jne 0x40702a
push 0
push 0
push str.Open_Share_Memory_Error.
mov ecx, dword [ebp - 0x504]
call fcn.0042d318
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x27c]
call fcn.004369e9
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x158]
call fcn.00401d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x280]
call fcn.00401d60
jmp 0x407117
jmp 0x406fb3
push 0
push 0x19
push str.State_Share
mov ecx, dword [ebp - 0x504]
call fcn.00409de0
push 1
push 0x24
push str.RecData_Share
mov ecx, dword [ebp - 0x504]
call fcn.00409de0
push 2
push 0x6e
push str.MainData_Share
mov ecx, dword [ebp - 0x504]
call fcn.00409de0
mov ecx, dword [ebp - 0x504]
call fcn.00409f70
push str.APPLICATION_SETTING
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40050
call fcn.0041a000
push 1
push str.BgaSecsSwitch
mov ecx, dword [ebp - 0x504]
add ecx, 0x2d40050
call fcn.0041a110
test eax, eax
jne 0x4070d7
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x27c]
call fcn.004369e9
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x158]
call fcn.00401d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x280]
call fcn.00401d60
jmp 0x407117
call fcn.0041aaf0
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x27c]
call fcn.004369e9
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x158]
call fcn.00401d60
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x280]
call fcn.00401d60
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046a109
mov esp, ebp
pop ebp
ret