Function at 0x4214f0
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x47be2b
mov eax, dword fs:[0]
push eax
mov eax, 0x2fe0
call fcn.00465fa0
mov eax, dword [0x4a0538]
xor eax, esp
mov dword [esp + 0x2fdc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a0538]
xor eax, esp
push eax
lea eax, [esp + 0x2ff4]
mov dword fs:[0], eax
push 0
push 0x80
push 2
push 0
push 0
mov ebp, ecx
push 0x40000000
lea eax, [ebp + 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov dword [esp + 0x20], esi
cmp esi, 0xffffffff
jne 0x41f965
mov ecx, dword [0x4a1ecc]
push 0x30
push ecx
push str.File_Creation_Error_
push str.mErrAccess
push str.Exporting_Dialog
mov ecx, 0x24a4558
call fcn.00422400
mov edx, dword [ebp + 0x20]
push eax
push edx
mov ecx, 0x24a4558
call fcn.004219b0
mov ecx, ebp
call fcn.004363cc
jmp 0x41ff1f
cmp dword [0x4a1d44], 1
jne 0x41f975
mov eax, str.Batch_Date__Time_Customer_Name_ID_No._A_C_No._Currency_No._Denom._Serial_No._r_n
jmp 0x41f98e
push str.Batch_Date__Time_Bank_Branch_Teller_ID_Teller_Name_In_Out_Customer_Name_ID_No._A_C_No._Currency_No._Denom._Serial_No._r_n
push str.HeaderCSV
push str.Exporting_Dialog
mov ecx, 0x24a4558
call fcn.00422400
mov ecx, eax
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x41f993
push 0
lea edx, [esp + 0x2c]
push edx
sub ecx, edi
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push 0x3e8
call fcn.00401f70
xor esi, esi
push esi
mov ebx, eax
push 0x3e8
mov dword [esp + 0x3c], ebx
call fcn.00401f70
push str.On_exporting__s___d__d_
push str.sStepMsg2
mov edi, eax
push str.Exporting_Dialog
mov ecx, 0x24a4558
mov dword [esp + 0x44], edi
call fcn.00422400
push 0x4c
mov dword [esp + 0x44], eax
lea eax, [esp + 0x27c]
push esi
push eax
mov dword [esp + 0x280], esi
call fcn.00463860
push 0x1590
lea ecx, [esp + 0x2d4]
push esi
push ecx
call fcn.00463860
push 0x4c
lea edx, [esp + 0x1874]
push esi
push edx
mov dword [esp + 0x1878], esi
call fcn.00463860
push 0x1590
lea eax, [esp + 0x18cc]
push esi
push eax
call fcn.00463860
push 0x114
lea ecx, [esp + 0x7c]
push esi
push ecx
mov dword [esp + 0x80], esi
call fcn.00463860
push 0x114
lea edx, [esp + 0x1a0]
push esi
push edx
mov dword [esp + 0x1a4], esi
call fcn.00463860
add esp, 0x48
call fcn.00442426
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x41fa90
push 0x80004005
call fcn.00402090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov ecx, dword [ebp + 0x188]
cmp dword [ecx], esi
mov dword [esp + 0x2ffc], esi
mov dword [esp + 0x24], esi
jle 0x41fe36
mov esi, 1
mov dword [esp + 0x30], esi
mov ecx, ebp
call fcn.0041d790
cmp dword [ebp + 0x1e0], 0
je 0x41fe34
mov edx, dword [ebp + 0x188]
mov eax, dword [edx + 4]
mov edi, dword [esp + 0x24]
mov eax, dword [eax + edi*4]
push 0x5c
push eax
call fcn.00464f70
mov ecx, dword [ebp + 0x188]
mov edx, dword [ecx]
push edx
push esi
inc eax
push eax
mov eax, dword [esp + 0x54]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00407c80
mov edx, dword [esp + 0x38]
add esp, 0x1c
push edx
push 0x440
mov ecx, ebp
call fcn.0043e12f
mov ecx, eax
call fcn.0043e245
mov eax, dword [ebp + 0x1ac]
push 0
push esi
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [ebp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0x1bc
lea edx, [esp + 0x2e38]
push 0
push edx
call fcn.00463860
mov ecx, dword [ebp + 0x188]
mov edx, dword [ecx + 4]
add esp, 0xc
lea eax, [esp + 0x2e34]
push eax
mov eax, dword [edx + edi*4]
push eax
mov ecx, 0x4a1a80
call fcn.004030c0
mov ecx, dword [esp + 0x2f84]
push ecx
call fcn.00404b90
add esp, 4
push esi
lea edx, [esp + 0x2e38]
push edx
push ebx
mov ecx, ebp
mov byte [esp + 0x23], al
call fcn.0041e4c0
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fba3
sub eax, esi
mov dword [esp + 0x3c], eax
xor eax, eax
cmp dword [esp + 0x2fe4], eax
jle 0x41fcb3
xor esi, esi
mov dword [esp + 0x18], esi
jmp 0x41fbd4
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x3c]
lea edx, [ecx + ebx]
mov ecx, dword [esp + 0x2fe8]
mov byte [edx], 0
mov ecx, dword [esi + ecx]
test ecx, ecx
je 0x41fcb3
push ecx
movsx ecx, byte [esp + 0x1b]
push ecx
inc eax
push eax
push str.__d__c_d_
push edx
mov dword [esp + 0x40], eax
call fcn.004649e7
mov edx, dword [esp + 0x2ffc]
add esp, 0x14
lea eax, [esi + edx + 6]
push eax
lea ecx, [esp + 0x20]
push ecx
mov ecx, ebp
call fcn.0041e360
mov eax, dword [esp + 0x1c]
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x41fc30
mov edi, ebx
sub eax, ecx
mov esi, ecx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x41fc40
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebx
rep movsb byte es:[edi], byte [esi]
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41fc60
mov dx, word [0x485168]
mov word [eax], dx
mov cl, byte [0x48516a]
mov byte [eax + 2], cl
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fc80
sub eax, edx
push 0
lea edx, [esp + 0x2c]
push edx
push eax
mov eax, dword [esp + 0x2c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2c]
add dword [esp + 0x18], 0x20
cmp eax, dword [esp + 0x2fe4]
jl 0x41fbd0
mov ecx, dword [esp + 0x3c]
add ecx, ebx
push str._______DENOM._STACKER.__AMOUNT_
push ecx
call fcn.004649e7
mov eax, ebx
add esp, 8
dec eax
lea ebx, [ebx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41fcd0
mov dx, word [0x485168]
mov word [eax], dx
mov cl, byte [0x48516a]
mov byte [eax + 2], cl
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fcf0
sub eax, edx
push 0
lea edx, [esp + 0x2c]
push edx
push eax
mov eax, dword [esp + 0x2c]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2f84]
mov ecx, dword [esp + 0x24]
mov dword [esp + ecx*4 + 0x44], eax
xor esi, esi
mov edi, edi
lea edx, [eax + eax*4]
lea eax, [esi + edx*4]
mov edx, dword [esp + esi*4 + 0x2f88]
add eax, eax
mov ecx, dword [eax + eax + 0x49d0e8]
add eax, eax
add dword [esp + eax + 0x274], edx
mov edi, dword [esp + eax + 0x274]
mov ebx, ecx
imul ebx, edi
mov edi, dword [esp + 0x38]
mov dword [esp + eax + 0x1854], ebx
test ecx, ecx
jne 0x41fd7a
mov eax, dword [esp + 0x2fdc]
mov ecx, dword [esp + 0x2fd8]
push eax
push ecx
push str.___________________________TOTAL.__d___d_
push edi
call fcn.004649e7
add esp, 0x10
jmp 0x41fd96
mov eax, ecx
imul eax, edx
push eax
push edx
push ecx
movsx ecx, byte [esp + 0x23]
push ecx
push str.____________________________c_d__d__d_
push edi
call fcn.004649e7
add esp, 0x18
mov eax, edi
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41fda0
mov dx, word [0x485168]
mov word [eax], dx
mov cl, byte [0x48516a]
mov byte [eax + 2], cl
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fdc0
sub eax, edx
push 0
lea edx, [esp + 0x2c]
push edx
push eax
mov eax, dword [esp + 0x2c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x2f84]
lea ecx, [eax + eax*4]
lea edx, [esi + ecx*4]
cmp dword [edx*4 + 0x49d0e8], 0
je 0x41fdfe
inc esi
cmp esi, 0x14
jl 0x41fd20
lea eax, [esp + 0x2e34]
push eax
mov ecx, 0x4a1a80
call fcn.00402690
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
mov ecx, dword [ebp + 0x188]
mov ebx, dword [esp + 0x34]
inc eax
inc esi
cmp eax, dword [ecx]
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], esi
jl 0x41fac2
xor esi, esi
mov ecx, dword [ebp + 0x188]
mov ecx, dword [ecx]
xor edx, edx
xor eax, eax
cmp ecx, esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x2c], ecx
jle 0x41fe8a
mov edi, edi
xor ecx, ecx
cmp eax, esi
jle 0x41fe6f
mov edx, dword [esp + eax*4 + 0x44]
lea ebx, [ebx]
cmp dword [esp + ecx*4 + 0x44], edx
je 0x41fe6b
inc ecx
cmp ecx, eax
jl 0x41fe60
mov edx, dword [esp + 0x18]
cmp ecx, eax
jne 0x41fe83
mov ecx, dword [esp + eax*4 + 0x44]
mov dword [esp + edx*4 + 0x15c], ecx
inc edx
mov dword [esp + 0x18], edx
inc eax
cmp eax, dword [esp + 0x2c]
jl 0x41fe50
test edx, edx
jle 0x41febb
mov edi, edi
mov edx, dword [esp + esi*4 + 0x15c]
push edx
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x1858]
push eax
lea ecx, [esp + 0x27c]
push ecx
push edx
mov ecx, ebp
call fcn.0041efc0
inc esi
cmp esi, dword [esp + 0x18]
jl 0x41fe90
push ebx
call fcn.00401c00
push edi
call fcn.00401c00
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x188]
mov edx, dword [esp + 0x24]
cmp edx, dword [ecx]
mov ecx, ebp
jge 0x41fee9
call fcn.004363cc
jmp 0x41fef4
mov eax, dword [ebp]
mov edx, dword [eax + 0x158]
call edx
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x2ffc], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ff1f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x2ff4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2fdc]
xor ecx, esp
call fcn.004637ae
add esp, 0x2fec
ret
push esi
push edi
push 0x4857a4
push str.sStepMsg1
mov esi, ecx
push str.Exporting_Dialog
mov ecx, 0x24a4558
call fcn.00422400
push eax
push 0x440
mov ecx, esi
call fcn.0043e12f
mov ecx, eax
call fcn.0043e245
mov eax, dword [esi + 0x188]
movzx ecx, word [eax]
mov edx, dword [esi + 0x1ac]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
shl ecx, 0x10
push ecx
push 0
push 0x401
push edx
call edi
mov eax, dword [esi + 0x1ac]
push 0
push 0
push 0x402
push eax
call edi
mov ecx, dword [esi + 0x20]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [esi + 0x74]
sub eax, 0
pop edi
je 0x421576
sub eax, 1
jne 0x42157e
mov ecx, esi
pop esi
jmp fcn.00420830
mov ecx, esi
pop esi
jmp 0x41f8c0
pop esi
ret